/* 
   Theme: ScreenScale Premium - Light Mode
   Style: Clean, Modern, Professional
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #10b981;
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Cards */
.glass-card,
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover,
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    -webkit-text-fill-color: #ffffff;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--card-border);
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links a {
    color: var(--text-muted);
    margin-left: 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 5%;
}

/* Dashboard Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--card-border);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.sidebar a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    background: var(--bg-main);
    min-height: 100vh;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-heading);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
    background-color: #ffffff;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Settings Page */
.settings-section {
    margin-bottom: 1.5rem;
}

.api-key-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.api-key-box code {
    flex: 1;
    font-family: monospace;
    color: var(--primary);
}

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

table th {
    font-weight: 600;
    color: var(--text-heading);
    background: var(--bg-main);
}

table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

/* Heatmap Container */
.heatmap-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.heatmap-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.heatmap-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    padding: 0;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.footer-tagline {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 2rem;
    background: var(--bg-main);
    border-top: 1px solid var(--card-border);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

/* Legal Pages CSS Variables */
:root {
    --primary-rgb: 99, 102, 241;
    --secondary-rgb: 236, 72, 153;
    --background: var(--bg-main);
    --surface: var(--card-bg);
    --border: var(--card-border);
    --text: var(--text-main);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: 2rem;
    }

    .footer-column {
        align-items: center;
    }
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.5rem;
    }

    .nav-brand {
        flex: 1;
        font-size: 1.25rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 1rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--card-border);
        margin-top: 0.5rem;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .nav-links .btn-primary {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Grid adjustments */
    .grid-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Cards */
    .card,
    .glass-card {
        padding: 16px;
    }

    /* Header section */
    header {
        padding: 2rem 1rem !important;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 1rem !important;
    }

    /* Sidebar for dashboard */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Tables */
    table {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 8px 6px;
    }

    /* Forms */
    .form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* API Key box */
    .api-key-box {
        flex-direction: column;
        text-align: center;
    }

    .api-key-box code {
        word-break: break-all;
        font-size: 0.8rem;
    }
}