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

:root {
    /* Light Theme - Modern Colors */
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --text-color: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --button-bg: #f1f5f9;
    --header-bg: #ffffff;
    --link-color: #0ea5e9;
    --link-hover: #0284c7;
    --accent-color: #7c3aed;
    --table-row-bg: #f8fafc;
    --table-border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html.dark-theme {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --button-bg: #1e293b;
    --header-bg: #0f172a;
    --link-color: #38bdf8;
    --link-hover: #0ea5e9;
    --accent-color: #a78bfa;
    --table-row-bg: #1e293b;
    --table-border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Header Styles */
.header {
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.7);
}

html.dark-theme .header {
    background-color: rgba(15, 23, 42, 0.7);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--link-hover);
}

.language-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--link-color), var(--accent-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.lang-flag {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 6px;
    vertical-align: middle;
}

.lang-btn.active .lang-flag {
    /* No decoration */
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--button-bg);
    transform: scale(1.05) rotate(20deg);
    box-shadow: var(--shadow-md);
}

/* Main Content - Index Page */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 40px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(7, 165, 233, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
    z-index: 0;
}

.main-content::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

.logo-container {
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 50px;
    position: relative;
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, var(--link-color), var(--accent-color));
    border-radius: 32px;
    z-index: -1;
    opacity: 0.15;
    transition: all 0.4s ease;
}

.logo-container:hover::before {
    opacity: 0.25;
    transform: scale(1.08);
}

.logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 24px;
    padding: 16px;
    background: var(--button-bg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--link-color);
    box-shadow: 0 20px 40px rgba(7, 165, 233, 0.25);
}

.title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--link-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 50px;
    max-width: 550px;
    line-height: 1.6;
    font-weight: 500;
}

.buttons-container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 80px;
}

.app-button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    background-color: var(--button-bg);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 240px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.app-button:hover {
    background: linear-gradient(135deg, var(--link-color), var(--accent-color));
    border-color: transparent;
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(7, 165, 233, 0.3);
}

.app-button:hover {
    background-color: var(--link-color);
    border-color: var(--link-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.3);
}

.app-button img {
    filter: transition 0.3s ease;
}

.button-text {
    display: flex;
}

.button-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.app-button:hover .button-logo {
    transform: scale(1.1);
}

.button-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.button-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-name {
    font-size: 16px;
    font-weight: 700;
}

.button-name:empty {
    display: none;
}

.footer {
    margin-top: auto;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.footer-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--link-color), var(--accent-color));
    bottom: -6px;
    left: 0;
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-link:hover::after {
    width: 100%;
}

/* Main Content - Policy Page */
.policy-content {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.policy-header {
    margin-bottom: 70px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--link-color), var(--accent-color)) 1;
    padding-bottom: 40px;
    background: linear-gradient(135deg, transparent 0%, var(--bg-secondary) 100%);
    padding: 50px 40px 40px;
    margin: -80px -40px 70px -40px;
    border-radius: 0 0 16px 16px;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.policy-section {
    margin-bottom: 50px;
}

.policy-section h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--text-color) 0%, var(--link-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.policy-section h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--text-color) 0%, var(--link-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.policy-section p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.policy-section ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.policy-section li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.policy-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 18px;
    color: var(--link-color);
}

.important-note {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(7, 165, 233, 0.05) 100%);
    padding: 24px 28px;
    border-left: 5px solid var(--link-color);
    border-radius: 12px;
    margin: 40px 0;
    font-style: italic;
    box-shadow: 0 4px 15px rgba(7, 165, 233, 0.15);
    transition: all 0.3s ease;
}

.important-note:hover {
    box-shadow: 0 8px 25px rgba(7, 165, 233, 0.2);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 40px 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.table-wrapper:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.info-table thead,
.services-table thead,
.permissions-table thead {
    background-color: var(--button-bg);
}

.info-table,
.services-table,
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.info-table th,
.services-table th,
.permissions-table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(7, 165, 233, 0.05));
    border-bottom: 2px solid var(--link-color);
}

.info-table tbody tr:nth-child(odd),
.services-table tbody tr:nth-child(odd),
.permissions-table tbody tr:nth-child(odd) {
    background-color: var(--table-row-bg);
}

.services-table td a {
    color: var(--link-color);
    text-decoration: none;
}

.services-table td a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

.info-table td,
.services-table td,
.permissions-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--table-border);
    color: var(--text-secondary);
    line-height: 1.7;
    transition: background-color 0.2s ease;
}

.info-table tbody tr:hover,
.services-table tbody tr:hover,
.permissions-table tbody tr:hover {
    background-color: var(--bg-secondary) !important;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 16px 20px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .language-selector {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }

    .theme-toggle {
        align-self: flex-end;
        order: 2;
    }

    .back-link {
        order: 1;
    }

    .main-content {
        padding: 70px 20px;
    }

    .main-content::before {
        width: 300px;
        height: 300px;
        top: -150px;
        right: -150px;
    }

    .main-content::after {
        width: 250px;
        height: 250px;
        bottom: -50px;
        left: -50px;
    }

    .logo {
        width: 120px;
        height: 120px;
        border-radius: 18px;
        padding: 12px;
    }

    .logo-container {
        margin-bottom: 35px;
    }

    .title {
        font-size: 40px;
        letter-spacing: -1px;
    }

    .description {
        font-size: 16px;
        margin-bottom: 35px;
    }

    .buttons-container {
        flex-direction: column;
        width: 100%;
        gap: 16px;
        margin-bottom: 60px;
    }

    .app-button {
        width: 100%;
        min-width: unset;
        padding: 14px 24px;
    }

    .button-logo {
        width: 32px;
        height: 32px;
    }

    .policy-content {
        padding: 60px 20px;
    }

    .policy-header {
        margin: -60px -20px 50px -20px;
        padding: 35px 20px 30px;
        border-radius: 0 0 12px 12px;
    }

    .policy-header h1 {
        font-size: 32px;
        letter-spacing: -0.5px;
    }

    .policy-section h2 {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .policy-section h3 {
        font-size: 18px;
    }

    .info-table,
    .services-table,
    .permissions-table {
        font-size: 13px;
    }

    .info-table th,
    .services-table th,
    .permissions-table th,
    .info-table td,
    .services-table td,
    .permissions-table td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 28px;
    }

    .description {
        font-size: 14px;
    }

    .policy-header h1 {
        font-size: 22px;
    }

    .policy-section h2 {
        font-size: 18px;
    }

    .buttons-container {
        margin-bottom: 40px;
    }

    .footer {
        padding-top: 40px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    a {
        color: #0066cc;
    }
}

.app-button:hover .button-label {
    color: #fff !important;
}
