/* UST Foundation Day 2025 - Custom Styles */
/* Brand Colors: Black (#000), White (#FFF), Coral (#FF6B35) */

:root {
    --ust-black: #000000;
    --ust-white: #FFFFFF;
    --ust-coral: #FF6B35;
    --ust-coral-dark: #E55A2B;
    --ust-coral-light: #FF8A5C;
    --ust-gray-100: #F8F9FA;
    --ust-gray-200: #E9ECEF;
    --ust-gray-300: #DEE2E6;
    --ust-gray-600: #6C757D;
    --ust-gray-800: #343A40;
    --ust-gray-900: #212529;

    --primary-color: #FF6B35;
    --secondary-color: #000000;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --light-bg: #F8F9FA;
    --dark-bg: #000000;
}

/* Global */
html, body {
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

main {
    flex: 1;
}

/* UST Branded Navbar */
.navbar-dark.bg-dark {
    background-color: var(--ust-black) !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* UST Primary Button */
.btn-primary {
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ust-coral-dark);
    border-color: var(--ust-coral-dark);
}

.btn-outline-primary {
    color: var(--ust-coral);
    border-color: var(--ust-coral);
}

.btn-outline-primary:hover {
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
    color: white;
}

/* Touch-friendly buttons */
.btn-kiosk {
    padding: 1.5rem 2rem;
    font-size: 1.5rem;
    border-radius: 1rem;
    min-width: 200px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.btn-kiosk:active {
    transform: scale(0.98);
}

.btn-kiosk i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* UST Coral Button */
.btn-ust {
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
    color: white;
}

.btn-ust:hover {
    background-color: var(--ust-coral-dark);
    border-color: var(--ust-coral-dark);
    color: white;
}

/* Landing Page - UST Branded */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ust-black) 0%, var(--ust-gray-900) 50%, var(--ust-coral) 100%);
    color: white;
}

.landing-hero.with-bg {
    background-size: cover;
    background-position: center;
    position: relative;
}

.landing-hero.with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(255,107,53,0.3) 100%);
}

.landing-hero .content {
    position: relative;
    z-index: 1;
}

.landing-logo {
    max-width: 180px;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
}

.landing-hero h1 {
    font-weight: 800;
    letter-spacing: -1px;
}

/* Registration Page - UST Branded */
.register-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ust-black) 0%, var(--ust-gray-900) 100%);
}

.register-page.with-bg {
    background-size: cover;
    background-position: center;
}

.register-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    margin: 0 auto;
}

.camera-container {
    position: relative;
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 4/3;
}

#camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#photo-canvas {
    display: none;
}

#captured-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.camera-overlay {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.btn-camera {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
    color: white;
}

.btn-camera:hover {
    background-color: var(--ust-coral-dark);
    border-color: var(--ust-coral-dark);
}

/* Prize Cards */
.prize-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.prize-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--ust-gray-100) 0%, var(--ust-gray-200) 100%);
}

.prize-card .placeholder-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ust-gray-100) 0%, var(--ust-gray-200) 100%);
    color: var(--ust-gray-600);
    font-size: 4rem;
}

.prize-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Winner Cards */
.winner-card {
    border: none;
    border-radius: 1rem;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DE 100%);
    overflow: hidden;
    border-left: 4px solid var(--ust-coral);
}

.winner-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ust-coral);
}

.winner-prize-img {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

/* Admin Dashboard */
.stat-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Admin Sidebar - UST Black */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--ust-black);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 107, 53, 0.1);
    color: white;
    border-left-color: var(--ust-coral);
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 107, 53, 0.2);
    color: var(--ust-coral);
    border-left-color: var(--ust-coral);
}

.admin-sidebar .nav-link i {
    width: 24px;
}

/* Live Draw Screen - UST Branded */
.live-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ust-black) 0%, var(--ust-gray-900) 50%, #1a0a00 100%);
    color: white;
    overflow: hidden;
}

.live-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.live-idle .waiting-icon {
    font-size: 8rem;
    color: var(--ust-coral);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.live-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.winner-display {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

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

.winner-photo-large {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--ust-coral);
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.5);
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 60px rgba(255, 107, 53, 0.5); }
    50% { box-shadow: 0 0 100px rgba(255, 107, 53, 0.8); }
}

.winner-name {
    font-size: 4rem;
    font-weight: bold;
    margin: 2rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-display {
    background: rgba(255, 107, 53, 0.1);
    padding: 2rem;
    border-radius: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.prize-image-large {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 1rem;
}

.prize-title-large {
    font-size: 2rem;
    margin-top: 1rem;
    color: var(--ust-coral-light);
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Draw Control - UST Branded */
.draw-control {
    background: linear-gradient(135deg, var(--ust-black) 0%, var(--ust-gray-900) 100%);
    color: white;
    border-radius: 1.5rem;
    padding: 2rem;
}

.btn-draw {
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    border-radius: 3rem;
    background: linear-gradient(135deg, var(--ust-coral) 0%, var(--ust-coral-dark) 100%);
    border: none;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.btn-draw:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    color: white;
}

/* Quiz */
.quiz-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-option {
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    border: 2px solid var(--ust-gray-300);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--ust-coral);
    background: rgba(255, 107, 53, 0.05);
}

.quiz-option input:checked + .quiz-option-text {
    color: var(--ust-coral);
    font-weight: 600;
}

.quiz-option:has(input:checked) {
    border-color: var(--ust-coral);
    background: rgba(255, 107, 53, 0.1);
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: transform 0.2s;
}

.leaderboard-item:hover {
    transform: translateX(5px);
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

.leaderboard-rank.gold { background: var(--ust-coral); color: #fff; }
.leaderboard-rank.silver { background: var(--ust-gray-600); color: #fff; }
.leaderboard-rank.bronze { background: var(--ust-coral-light); color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .btn-kiosk {
        padding: 1rem 1.5rem;
        font-size: 1.2rem;
        min-width: 150px;
    }

    .btn-kiosk i {
        font-size: 1.5rem;
    }

    .winner-photo-large {
        width: 200px;
        height: 200px;
    }

    .winner-name {
        font-size: 2.5rem;
    }

    .prize-title-large {
        font-size: 1.5rem;
    }
}

/* Participant table */
.participant-photo-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Success page - UST Branded */
.success-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ust-black) 0%, var(--ust-gray-900) 50%, var(--ust-coral) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card {
    background: white;
    border-radius: 2rem;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 5rem;
    color: var(--ust-coral);
    animation: bounceIn 0.6s;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Fullscreen button */
.btn-fullscreen {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.2s;
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
}

.btn-fullscreen:hover {
    opacity: 1;
    background-color: var(--ust-coral-dark);
}

/* Form styling */
.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
}

.form-control:focus {
    border-color: var(--ust-coral);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Photo placeholder */
.photo-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--ust-gray-200);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ust-gray-600);
    font-size: 4rem;
}

/* QR Code container */
.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* UST Accent elements */
.text-ust {
    color: var(--ust-coral) !important;
}

.bg-ust {
    background-color: var(--ust-coral) !important;
}

.border-ust {
    border-color: var(--ust-coral) !important;
}

/* Badge styling */
.badge.bg-primary {
    background-color: var(--ust-coral) !important;
}

/* Alert styling */
.alert-primary {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: var(--ust-coral);
    color: var(--ust-coral-dark);
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

/* Pagination */
.page-link {
    color: var(--ust-coral);
}

.page-item.active .page-link {
    background-color: var(--ust-coral);
    border-color: var(--ust-coral);
}

.page-link:hover {
    color: var(--ust-coral-dark);
}
