/**
 * Prime Academy Digital Photo Booth
 * Custom Styles
 * 
 * Brand Colors:
 * Primary: #053867
 * Secondary: #253985
 * Accent: #F7BA23
 * Accent-2: #F3CE49
 */

/* ============================================
   Global Styles
   ============================================ */

:root {
    --primary-color: #053867;
    --secondary-color: #253985;
    --accent-color: #F7BA23;
    --accent2-color: #F3CE49;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ============================================
   Buttons
   ============================================ */

.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(247, 186, 35, 0.3);
}

.btn-accent:hover {
    background-color: var(--accent2-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 186, 35, 0.4);
}

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

.btn-accent:disabled {
    background-color: #d3d3d3;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: white !important;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.1rem;
    opacity: 0.95;
}

.min-vh-75 {
    min-height: 75vh;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.hero-image-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* ============================================
   Cards
   ============================================ */

.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    color: white !important;
}

.card-header h5 {
    color: white !important;
    margin: 0;
}

.reward-card {
    border-top: 4px solid var(--accent-color);
}

/* ============================================
   Rules Section
   ============================================ */

.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.rules-list li:last-child {
    border-bottom: none;
}

/* ============================================
   Caption Section
   ============================================ */

.caption-textarea {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    font-size: 0.95rem;
    resize: none;
    font-family: 'Poppins', sans-serif;
}

.caption-textarea:focus {
    background-color: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(247, 186, 35, 0.25);
}

/* ============================================
   Accordion (FAQ)
   ============================================ */

.accordion-button {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(5, 56, 103, 0.25);
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
}

.cta-section h2 {
    color: white;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ============================================
   Photo Booth Styles
   ============================================ */

.camera-container {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 4:3 Aspect Ratio (1600/1200 = 1.333) */
    background: #000;
    border-radius: 0;
    overflow: hidden;
}

.camera-container video,
.camera-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Safe area guide overlay on video */
.camera-container::after {
    content: '';
    position: absolute;
    top: 15.6%;
    left: 0;
    right: 0;
    bottom: 15.6%;
    border: 4px solid #00FF00;
    pointer-events: none;
    z-index: 10;
}

.camera-container::before {
    content: 'Everything inside green box will be captured';
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 0, 0.95);
    color: #000;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    z-index: 11;
    pointer-events: none;
    white-space: nowrap;
}

.camera-placeholder,
.camera-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.preview-container {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 4:3 Aspect Ratio (same as camera) */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0;
    overflow: hidden;
}

.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ============================================
   Form Styles
   ============================================ */

.form-label {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(247, 186, 35, 0.25);
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(247, 186, 35, 0.25);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    border-radius: 10px;
    border: none;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* ============================================
   Toasts
   ============================================ */

.toast {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Utilities
   ============================================ */

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   Smooth Scrolling
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .min-vh-75 {
        min-height: auto;
    }
    
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    
    .countdown-box {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   Loading States
   ============================================ */

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none;
    }
}

/* ============================================
   Custom Scrollbar (Webkit browsers)
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
