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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

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

.header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
    line-height: 1.6;
}

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

.input-label {
    display: block;
    color: #34495e;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.input-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.input-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-textarea::placeholder {
    color: #95a5a6;
}

.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.results {
    display: none;
    margin-top: 30px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.result-title {
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-content {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

/* Ensure HTML line breaks are rendered properly */
#suggestionText {
    white-space: pre-line;
}

#suggestionText br {
    display: block;
    margin: 8px 0;
}

.classification-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    margin-top: 10px;
}

.suggestions {
    background: #f8f9ff;
    border-left: 4px solid #52c41a;
}

.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.error {
    background: #fff2f0;
    border-left: 4px solid #ff4d4f;
    color: #d32f2f;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 25px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
}

.error-message {
    display: none;
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #d32f2f;
    background: #fff5f5;
    border: 1px solid #ffcccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-in-out;
    text-align: center;
    line-height: 1.5;
}

.error-message::before {
    content: "";
    font-size: 18px;
    margin-right: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Examples Section Styles */
.examples-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.examples-title {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.language-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.tab-btn:hover {
    background: #f0f0f0;
    color: #2c3e50;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.examples-content {
    position: relative;
}

.examples-tab {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

.example-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.example-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.example-item:active {
    transform: translateY(0);
}

.example-text {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-item:hover .example-text {
    color: #2c3e50;
}

/* Responsive design for examples */
@media (max-width: 768px) {
    .examples-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .language-tabs {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .example-item {
        padding: 10px 12px;
    }
    
    .example-text {
        font-size: 13px;
    }
}
