* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 153, 51, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(19, 136, 8, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: fadeInDown 0.8s ease-out;
}

.subtitle {
    color: #333;
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.input-section {
    margin-bottom: 30px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.input-header label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.char-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

#textInput {
    width: 100%;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
    line-height: 1.6;
}

#textInput:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 0 4px rgba(255, 153, 51, 0.1);
}

.quick-samples {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.sample-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    color: #333;
}

.sample-btn:hover {
    border-color: #FF9933;
    background: #FFF5E6;
    transform: translateY(-2px);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.control-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.control-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.control-group select:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 0 4px rgba(255, 153, 51, 0.1);
}

.slider-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.slider-group label {
    min-width: 90px;
}

.control-group input[type="range"] {
    flex: 1;
    cursor: pointer;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9933, #138808);
    cursor: pointer;
    transition: all 0.3s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9933, #138808);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.control-group span {
    min-width: 50px;
    font-weight: 600;
    color: #FF9933;
    font-size: 0.95rem;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #FF9933 0%, #FF6B00 100%);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 153, 51, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #138808 0%, #0a5a05 100%);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(19, 136, 8, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

.btn-clear {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.btn-clear:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(127, 140, 141, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.progress-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9933, #138808);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.info-section {
    background: linear-gradient(135deg, #FFF5E6, #E8F5E9);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.info-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 8px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 25px;
    }

    .button-group {
        grid-template-columns: 1fr 1fr;
    }

    .control-row {
        flex-direction: column;
    }

    .control-group {
        width: 100%;
        min-width: unset;
    }

    .slider-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .slider-group label {
        min-width: unset;
    }

    .control-group input[type="range"] {
        width: 100%;
    }

    .quick-samples {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .button-group {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8rem;
    }
}