/**
 * Index Page Styles - Modern Black Theme
 * Styles specific to the main landing page (index.html)
 */

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: black;
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header h1 .subtitle {
    color: var(--text-secondary);
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher - Redesigned */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #18181b;
    border-radius: 9999px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.language-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: 9999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-btn:hover {
    color: var(--text-secondary);
}

.language-btn.active {
    background: white;
    color: black;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Header Buttons */
.api-btn,
.feedback-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 9999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.api-btn:hover,
.feedback-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.header-divider {
    width: 1px;
    height: 16px;
    background: #27272a;
    margin: 0 4px;
}

/* Auth Section */
#authSection {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #18181b;
    color: white;
    border: 1px solid #3f3f46;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #27272a;
    border-color: #52525b;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid #27272a;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    ring: 2px solid black;
}

.logout-btn {
    padding: 8px;
    border-radius: 9999px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Hero Section */
.initial-view {
    width: 100%;
    max-width: 768px;
    margin: 48px auto 80px;
    padding: 0 16px;
}

.hero-title {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-title p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Requirement Dialog */
.requirement-dialog {
    position: relative;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.requirement-dialog:hover {
    border-color: var(--border-hover);
}

.requirement-dialog::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(to right, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 16px;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 1s ease;
}

.requirement-dialog:hover::before {
    opacity: 1;
}

.requirement-inner {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
}

.requirement-input {
    width: 100%;
    min-height: 160px;
    background: transparent;
    color: white;
    padding: 24px;
    resize: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.75;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.requirement-input:focus {
    outline: none;
}

.requirement-input::placeholder {
    color: #52525b;
}

/* Uploaded Files List */
.uploaded-files {
    padding: 0 24px 8px;
    display: none;
}

.uploaded-files.show {
    display: block;
}

#fileList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(39, 39, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 6px 8px 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-item-name {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 150px;
}

.file-item-name span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-size {
    color: var(--text-tertiary);
    font-size: 10px;
}

.file-item-remove {
    color: var(--error-color);
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s;
    margin-left: 4px;
}

.file-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Toolbar */
.requirement-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(39, 39, 42, 0.3);
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: white;
    color: black;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

.generate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: white;
    color: black;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.generate-btn:hover {
    background: #e6e6e6;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.generate-btn:disabled:hover {
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Examples Section */
.examples-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

.examples-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
}

.examples-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.examples-header p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.example-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.example-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.example-icon {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(39, 39, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.example-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: white;
    margin-bottom: 8px;
}

.example-card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.example-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-tag {
    padding: 4px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-tertiary);
    background: #18181b;
    border-radius: 4px;
    border: 1px solid #27272a;
}

/* Modal Overrides */
.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title h2 {
        font-size: 2rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .header-actions .api-btn,
    .header-actions .feedback-btn,
    .header-divider {
        display: none;
    }

    .language-switcher {
        gap: 4px;
    }

    .language-btn {
        padding: 4px 12px;
        font-size: 11px;
    }
}

/* Footer */
.footer {
    width: 100%;
    padding: 32px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-primary);
}

.footer-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-divider {
    color: var(--text-tertiary);
    font-size: 12px;
}

.footer-contact {
    max-width: 1200px;
    margin: 12px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-email {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .hero-title h2 {
        font-size: 1.75rem;
    }

    .requirement-input {
        font-size: 1rem;
        padding: 20px;
    }

    .requirement-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .upload-btn {
        justify-content: center;
    }

    .generate-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modal Overrides */
.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title h2 {
        font-size: 2rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .header-actions .api-btn,
    .header-actions .feedback-btn,
    .header-divider {
        display: none;
    }

    .language-switcher {
        gap: 4px;
    }

    .language-btn {
        padding: 4px 12px;
        font-size: 11px;
    }
}

/* Footer */
.footer {
    width: 100%;
    padding: 32px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-primary);
}

.footer-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-divider {
    color: var(--text-tertiary);
    font-size: 12px;
}

.footer-contact {
    max-width: 1200px;
    margin: 12px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-email {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: var(--text-primary);
}
