/* Klickie Deck Portal - Styles */
/* Matches klickie.me design language */

:root {
    --primary: #00C853;
    --primary-dark: #00A844;
    --primary-light: #E8F5E9;
    --bg: #FAFAFA;
    --bg-white: #FFFFFF;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border: #E0E0E0;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

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

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Prevent selection and context menu on protected content */
.protected {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

/* ============================================
   EMAIL GATE
   ============================================ */

.gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.gate-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.gate-logo {
    margin-bottom: 32px;
}

.gate-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.gate-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.gate-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Checkbox */
.checkbox-group {
    position: relative;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-text {
    flex: 1;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.info-icon:hover {
    opacity: 1;
}

.info-tooltip,
.footer-info-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--text);
    color: var(--bg-white);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all var(--transition);
    z-index: 100;
}

.info-tooltip.visible,
.footer-info-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--bg-white);
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg-white);
}

.btn-secondary .info-icon-small svg circle {
    stroke: var(--primary);
}

.btn-secondary .info-icon-small svg text {
    fill: var(--primary);
}

.btn-secondary:hover .info-icon-small svg circle {
    stroke: var(--bg-white);
}

.btn-secondary:hover .info-icon-small svg text {
    fill: var(--bg-white);
}

/* Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gate-footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.gate-footer a {
    color: var(--primary);
    text-decoration: none;
}

.gate-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   VIEWER
   ============================================ */

.viewer {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.viewer-logo {
    display: flex;
    align-items: center;
}

.viewer-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.viewer-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.viewer-page {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
}

.viewer-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.viewer-slide-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-slide {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-white);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Navigation arrows */
.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
    opacity: 0.8;
}

.viewer-nav:hover {
    opacity: 1;
    box-shadow: var(--shadow-hover);
}

.viewer-nav-left {
    left: 24px;
}

.viewer-nav-right {
    right: 24px;
}

.viewer-nav.disabled {
    opacity: 0.3;
    cursor: default;
}

.viewer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    position: relative;
}

.footer-info-tooltip {
    bottom: calc(100% + 8px);
    top: auto;
    left: 24px;
    right: auto;
    max-width: 300px;
}

.viewer-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.viewer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.viewer-dot:hover {
    background: var(--text-muted);
}

.viewer-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.viewer-link {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* ============================================
   404 NOT FOUND
   ============================================ */

.not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.not-found-content {
    text-align: center;
}

.not-found-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.not-found-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.not-found-content .btn-primary {
    width: auto;
    display: inline-flex;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .gate-card {
        padding: 32px 24px;
    }

    .viewer-header {
        padding: 12px 16px;
    }

    .viewer-main {
        padding: 16px;
    }

    .viewer-nav {
        width: 40px;
        height: 40px;
    }

    .viewer-nav-left {
        left: 8px;
    }

    .viewer-nav-right {
        right: 8px;
    }

    .viewer-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .viewer-dots {
        position: static;
        transform: none;
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .btn-secondary {
        font-size: 13px;
        padding: 8px 16px;
    }

    .viewer-link {
        font-size: 13px;
    }
}

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

    .form-group input[type="text"],
    .form-group input[type="email"] {
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 15px;
    }

    .viewer-slide {
        border-radius: var(--radius-sm);
    }
}
