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

body {
    font-family: 'Play', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 5px;
}

.header-description {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Main Content */
.main-content {
    padding: 30px;
}

/* Tabs */
.converter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
}

.tab-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* AI Section */
.ai-section {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.ai-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.ai-section>p {
    color: #666;
    margin-bottom: 20px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 20px;
}

.upload-area:hover {
    background: #f0f4ff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-area h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.upload-area p {
    color: #666;
    font-size: 0.9rem;
}

/* Text Input Area */
.text-input-area {
    margin-bottom: 20px;
}

.text-input-area textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Play', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.text-input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Options Panel */
.options-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.options-panel label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.options-panel label span {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.options-panel select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.options-panel select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.ai-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.ai-btn.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-top: 15px;
}

.btn-icon {
    font-size: 1.3rem;
}

/* Result Area */
.result-area {
    margin-top: 25px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h4 {
    color: #333;
    font-size: 1.2rem;
}

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

.copy-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
}

.copy-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.copy-btn.secondary {
    background: #28a745;
}

.copy-btn.secondary:hover {
    background: #218838;
}

.result-content {
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 1rem;
}

/* Questions Container */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.question-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.question-item label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.question-item input,
.question-item select,
.question-item textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
}

.question-item textarea {
    resize: vertical;
    min-height: 60px;
}

/* API Setup */
.api-setup {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.api-setup h3 {
    color: #333;
    margin-bottom: 10px;
}

.api-setup p {
    color: #666;
    margin-bottom: 15px;
}

.api-setup a {
    color: #667eea;
    font-weight: 600;
}

.api-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.api-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Play', monospace;
    font-size: 0.95rem;
}

.save-btn {
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
}

.save-btn:hover {
    background: #218838;
}

.api-status {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.api-status.success {
    color: #28a745;
}

.api-status.error {
    color: #dc3545;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: #f9f9f9;
    padding: 30px;
    text-align: center;
    border-top: 2px solid #e0e0e0;
}

.settings-section {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
}

.settings-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.support-section {
    margin-bottom: 20px;
}

.support-text {
    color: #666;
    margin-bottom: 15px;
}

.support-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.author-section {
    margin-bottom: 15px;
}

.author-section p {
    color: #666;
}

.author-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.powered-by {
    color: #999;
    font-size: 0.9rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .converter-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .options-panel {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .button-group {
        width: 100%;
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

    .api-input-group {
        flex-direction: column;
    }

    .save-btn {
        width: 100%;
    }
}