/* SorguJan AI - Shared UI Styles */

:root {
    --nav-height: 72px;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --gold-gradient: linear-gradient(135deg, #FFD700, #ff8c00);
    --text-primary: #e0e0e0;
    --text-secondary: #9a9ab0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Navbar */
.side-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    height: var(--nav-height);
    background: rgba(15, 12, 41, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-auth-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-email {
    font-size: 13px;
    color: #9a9ab0;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 20px;
}

.nav-brand img {
    width: 44px;
    height: 44px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

.nav-cta {
    padding: 10px 24px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
.main-footer {
    padding: 60px 40px 40px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h2 {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links ul li a:hover {
    color: #667eea;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 13px;
}

/* Comparison Table Premium Redesign */
.comparison-table-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 60px auto 0;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.comparison-table {
    width: 100%;
    min-width: 800px;
    /* Ensure it doesn't squash on desktop */
    border-collapse: collapse;
    color: var(--text-primary);
}

.comparison-table th,
.comparison-table td {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table thead th {
    background: rgba(255, 255, 255, 0.05);
    color: #FFD700;
    font-size: 16px;
    font-weight: 700;
}

.comparison-table td:first-child {
    text-align: left;
    padding-left: 30px;
    font-weight: 600;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.02);
    width: 25%;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.check-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.3));
}

.cross-icon {
    font-size: 18px;
    opacity: 0.5;
}

.plan-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.limit-text {
    font-size: 13px;
    color: #9a9ab0;
}

.table-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.table-btn.free {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.table-btn.paid {
    background: linear-gradient(135deg, #FFD700, #ff8c00);
    color: #000;
}

.table-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Auth Notice & User Info */
.auth-notice {
    text-align: center;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin: 40px auto;
    max-width: 600px;
}

.auth-notice p {
    color: #eab308;
    margin-bottom: 0;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 32px;
    background: white;
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

.user-info {
    text-align: center;
    margin: 40px auto;
    max-width: 600px;
}

.user-email {
    color: #9a9ab0;
    font-size: 14px;
}

.user-plan {
    color: #FFD700;
    font-weight: 700;
    font-size: 20px;
    margin: 8px 0;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #9a9ab0;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn:hover {
    border-color: #f44336;
    color: #f44336;
}

/* Payment Modal */
#payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

#payment-modal.active {
    display: flex;
}

#payment-modal .modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    color: #FFD700;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    color: #9a9ab0;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #fff;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Page Spacing for fixed nav */
body {
    padding-top: calc(var(--nav-height) + 100px) !important;
}

section,
.container {
    scroll-margin-top: var(--nav-height);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .side-nav {
        padding: 0 20px;
    }
}

/* Policy Pages Styling (Privacy & Terms) */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 60px;
}

.container h1 {
    color: #FFD700;
    margin-bottom: 24px;
    font-size: 28px;
}

.container h2 {
    color: #667eea;
    margin: 24px 0 12px;
    font-size: 20px;
}

.container h3 {
    color: #8b9cf7;
    margin: 16px 0 8px;
    font-size: 16px;
}

.container p,
.container li {
    margin-bottom: 12px;
    color: #b0b0b0;
    line-height: 1.6;
}

.container ul {
    padding-left: 24px;
}

.highlight {
    background: rgba(102, 126, 234, 0.2);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin: 16px 0;
    color: var(--text-primary);
}

.warning {
    background: rgba(234, 179, 8, 0.15);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #eab308;
    margin: 16px 0;
    color: var(--text-primary);
}

.date {
    color: #666;
    font-size: 14px;
    margin-top: 40px;
}

/* Policy Tables */
.container table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.container table th,
.container table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    text-align: left;
}

.container table th {
    background: rgba(102, 126, 234, 0.2);
    color: #8b9cf7;
}

.container table td {
    color: #b0b0b0;
}