/* CourtSense Predict - Dark Tech Theme */
/* Framework: Primer CSS + Custom Dark Theme */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --border-color: #30363d;
    --success: #3fb950;
    --warning: #d29922;
    --danger: #f85149;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #33ddff;
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

.navbar-brand .brand-icon {
    font-size: 1.5rem;
}

.navbar-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    text-decoration: none;
}

@media (max-width: 640px) {
    .navbar-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .navbar-menu {
        width: 100%;
        justify-content: center;
        gap: 4px;
    }

    .navbar-menu a {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    text-decoration: none;
    color: #fff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 80px 20px;
    overflow: hidden;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-content h1 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-device {
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-mockup {
    position: relative;
    max-width: 280px;
    width: 100%;
}

.device-frame {
    background: linear-gradient(145deg, #2d333b, #1c2128);
    border-radius: 36px;
    padding: 12px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 212, 255, 0.15);
}

.device-screen {
    border-radius: 28px;
    overflow: hidden;
    background: #000;
}

.device-screen img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .device-mockup {
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        max-width: 280px;
    }
}

/* Screenshots Section */
.screenshots-section {
    padding: 80px 20px;
    background: var(--bg-primary);
    max-height: 500px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    color: var(--text-primary);
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
}

.carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 350px;
}

.carousel-slide {
    display: none;
    justify-content: center;
    align-items: center;
}

.carousel-slide.active {
    display: flex;
}

.carousel-device {
    max-width: 200px;
    width: 100%;
}

.carousel-device .device-frame {
    padding: 8px;
    border-radius: 28px;
}

.carousel-device .device-screen {
    border-radius: 22px;
}

.carousel-device .device-screen img {
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: blur(5px);
}

.carousel-device .device-screen img.loaded {
    filter: blur(0);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.carousel-nav:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.carousel-nav.prev {
    left: 0;
}

.carousel-nav.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

@media (max-width: 640px) {
    .screenshots-section {
        padding: 40px 20px;
        max-height: 400px;
    }

    .carousel {
        height: 280px;
    }

    .carousel-device {
        max-width: 160px;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: var(--bg-secondary);
}

.features-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.feature-block.reverse {
    direction: rtl;
}

.feature-block.reverse > * {
    direction: ltr;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.feature-content {
    text-align: left;
}

.feature-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-content p {
    margin-bottom: 0;
}

.feature-visual {
    display: flex;
    justify-content: center;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 100%;
    max-width: 300px;
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.feature-card-icon {
    font-size: 2rem;
}

.feature-card h4 {
    color: var(--accent-primary);
    margin-bottom: 0;
}

.star-rating {
    color: var(--warning);
    font-size: 1.25rem;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .feature-block,
    .feature-block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .feature-content {
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 1rem;
    }
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
}

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

.footer-brand h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-links h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Content Pages */
.page-header {
    background: var(--bg-secondary);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    margin-bottom: 0;
}

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

.content-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.content-container h2 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.content-container h2:first-child {
    margin-top: 0;
}

.content-container h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-container p {
    text-align: left;
    margin-bottom: 1rem;
}

.content-container ul,
.content-container ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-container li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.content-container a {
    color: var(--accent-primary);
}

/* Contact Form */
.contact-section {
    padding: 60px 20px;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 12px;
}

.form-submit {
    text-align: center;
}

.form-message {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.form-message.success {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.form-message.error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Privacy Accept Button */
.privacy-accept-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent-primary);
    padding: 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.privacy-accept-container .btn {
    min-width: 200px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
}

.lightbox-close:hover {
    color: var(--accent-primary);
}

/* Responsive utilities */
@media (max-width: 480px) {
    .contact-card {
        padding: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .privacy-accept-container,
    .carousel-nav {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}
