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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    font-family: 'Dancing Script', cursive;
    color: #dc2626;
    margin-bottom: 10px;
}

header p {
    color: #b0b0b0;
    font-size: 1rem;
}

.info-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: #dc2626;
    transform: scale(1.1);
}

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

#textInput {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    font-family: 'Dancing Script', cursive;
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

#textInput:focus {
    outline: none;
    border-color: #dc2626;
    background: rgba(255, 255, 255, 0.12);
}

#textInput::placeholder {
    color: #808080;
}

.btn {
    padding: 12px 30px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-clear {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 2px solid rgba(220, 38, 38, 0.3);
    flex: 0 0 auto;
    width: auto;
}

.btn-clear:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    transform: translateY(-2px);
}

.btn-clear:active {
    transform: translateY(0);
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.button-group .btn-primary {
    flex: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 2px solid rgba(220, 38, 38, 0.3);
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
}

.animation-container {
    min-height: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 80px 40px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
}

#vara-container {
    width: 100%;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#vara-container svg {
    overflow: visible !important;
    max-width: 100%;
    height: auto;
}

.controls-section {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-size: 1rem;
    color: #e0e0e0;
    white-space: nowrap;
}

#colorPicker {
    width: 60px;
    height: 40px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

#colorPicker:hover {
    border-color: #dc2626;
}

.font-selector {
    padding: 8px 12px;
    font-size: 0.95rem;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-selector:hover {
    border-color: #dc2626;
    background: rgba(255, 255, 255, 0.12);
}

.font-selector:focus {
    outline: none;
    border-color: #dc2626;
}

.font-selector option {
    background: #1a1a1a;
    color: #e0e0e0;
}

#fontSizeSlider {
    width: 150px;
    height: 6px;
    border-radius: 5px;
    background: rgba(220, 38, 38, 0.3);
    outline: none;
    cursor: pointer;
}

#fontSizeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
}

#fontSizeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: none;
}

.download-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: #dc2626;
    margin-bottom: 20px;
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
}

.modal-content h3 {
    color: #dc2626;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.modal-content ol {
    margin: 10px 0 15px 25px;
}

.modal-content ol li {
    margin-bottom: 10px;
}

.modal-content ol ul {
    margin-top: 5px;
    margin-left: 20px;
}

.modal-content ol ul li {
    margin-bottom: 5px;
    list-style-type: disc;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-content ul {
    margin: 15px 0 15px 25px;
}

.modal-content li {
    margin-bottom: 10px;
}

.modal-content a {
    color: #dc2626;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal-content a:hover {
    color: #ff4444;
    text-decoration: underline;
}

.close {
    color: #999;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #dc2626;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    header h1 {
        font-size: 2rem;
    }

    #textInput {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .animation-container {
        padding: 60px 20px;
        min-height: 250px;
    }

    .controls-section {
        gap: 15px;
    }

    .font-selector {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    #fontSizeSlider {
        width: 120px;
    }

    .control-group label {
        font-size: 0.9rem;
    }

    .info-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-clear {
        width: 100%;
    }

    body {
        padding: 10px;
    }

    header p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .animation-container {
        padding: 40px 15px;
        min-height: 200px;
    }

    #textInput {
        font-size: 0.95rem;
        padding: 12px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 10px 15px;
    }

    .control-group label {
        font-size: 0.85rem;
    }

    .font-selector {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}
