/* ============================================
   SPOTLIGHT APP - CENTRALIZED STYLES
   Theme: Fiery Red
   ============================================ */

/* CSS Variables for Easy Theme Management */
:root {
    /* Primary Colors */
    --primary-red: #eb3349;
    --secondary-red: #f45c43;
    --hover-red-start: #f5576c;
    --hover-red-end: #ff6b6b;
    
    /* Background Colors */
    --bg-dark: #0a0a0a;
    --bg-dark-red-1: #1a0a0e;
    --bg-dark-red-2: #2e1619;
    --bg-overlay: rgba(26, 26, 46, 0.4);
    --bg-card: rgba(30, 30, 50, 0.5);
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #111;
    
    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.2);
    --border-accent: rgba(255, 255, 255, 0.3);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.8);
    --text-muted: #ccc;
    --text-gray: #999;
    --text-dark-gray: #666;
    
    /* Shadow Colors */
    --shadow-primary: rgba(235, 51, 73, 0.3);
    --shadow-secondary: rgba(235, 51, 73, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-darker: rgba(0, 0, 0, 0.5);
    
    /* Accent Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    --gradient-hover: linear-gradient(135deg, var(--hover-red-start) 0%, var(--hover-red-end) 100%);
    --gradient-background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-red-1) 50%, var(--bg-dark-red-2) 100%);
    
    /* Typography */
    --font-family: 'Montserrat', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Font Face Declarations */
@font-face {
    font-family: 'Montserrat';
    src: url('../font/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../font/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* ============================================
   REUSABLE ENTRY ANIMATIONS
   ============================================ */

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Reusable Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Special handling for elements that need to preserve transforms */
.controls-left.animate-slide-in-up,
.controls-bottom.animate-slide-in-up {
    opacity: 0;
}

.controls-left.animate-slide-in-up {
    animation: slideInUpCentered 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUpCentered {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Delay Classes for Staggered Animations */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Initial State for Animated Elements */
.animate-fade-in-up,
.animate-fade-in-down,
.animate-fade-in-left,
.animate-fade-in-right,
.animate-fade-in-scale,
.animate-slide-in-up {
    opacity: 0;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

body {
    font-family: var(--font-family);
    background: var(--gradient-background);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(235, 51, 73, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(244, 92, 67, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   CONTAINER STYLES
   ============================================ */

.container {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px var(--shadow-dark),
                0 0 0 1px var(--border-light),
                inset 0 1px 0 var(--border-light);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ============================================
   LOGO & BRANDING
   ============================================ */

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

.logo img {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
    text-align: center;
    color: var(--text-primary);
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: 2px;
}

h2 {
    text-align: center;
    color: var(--text-primary);
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    display: block;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ============================================
   FORM STYLES
   ============================================ */

form {
    background: rgba(20, 20, 30, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

label {
    display: block;
    margin: 20px 0 12px 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}

/* ============================================
   INPUT STYLES
   ============================================ */

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 500;
}

input[type="file"] {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed var(--border-accent);
    cursor: pointer;
    text-align: center;
    position: relative;
}

input[type="file"]::file-selector-button {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-primary);
}

input[type="text"]:focus,
input[type="file"]:focus {
    outline: none;
    border-color: rgba(235, 51, 73, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(235, 51, 73, 0.15);
    transform: translateY(-2px);
}

input[type="file"]:hover {
    border-color: rgba(235, 51, 73, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn,
input[type="submit"],
input[type="button"],
button[type="submit"],
button[type="button"] {
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 8px 20px var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.btn::before,
input[type="submit"]::before,
input[type="button"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before {
    left: 100%;
}

.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--shadow-secondary);
}

.btn:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px var(--shadow-primary);
}

.btn:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(235, 51, 73, 0.3);
}

a:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-accent);
}

/* Action Buttons (Gallery, Print, Share) */
.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.action-btn i {
    font-size: 14px;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(235, 51, 73, 0.3);
}

.print-btn,
.view-btn {
    background: #666666;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 5px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.print-btn:hover,
.view-btn:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 102, 102, 0.3);
}

.print-btn:focus,
.view-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(235, 51, 73, 0.3);
}

.share-btn {
    background: #888888;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 5px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.share-btn:hover {
    background: #777;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(136, 136, 136, 0.3);
}

.share-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(235, 51, 73, 0.3);
}

/* ============================================
   LINK STYLES
   ============================================ */

.gallery-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px);
}

.gallery-link:hover {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.3) 0%, rgba(244, 92, 67, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-primary);
}

.gallery-link:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(235, 51, 73, 0.3);
}

/* ============================================
   RESULT/IMAGE DISPLAY
   ============================================ */

.result {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid #333;
}

.result h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.result img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1);
    margin: 20px 0;
    transition: transform 0.3s ease;
}

.result img:hover {
    transform: scale(1.02);
}

.result p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 15px 0;
}

/* ============================================
   BUTTON GROUP
   ============================================ */

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.d-none {
    display: none !important;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        margin: 5px;
        padding: 15px;
    }
    
    .logo img {
        max-width: 200px;
    }
    
    h1, h2 {
        font-size: 1.5rem;
    }
    
    form {
        padding: 15px;
    }
    
    label {
        font-size: 1rem;
        margin: 15px 0 6px 0;
    }
    
    input[type="text"],
    input[type="file"] {
        padding: 12px;
        font-size: 14px;
    }
    
    input[type="submit"],
    input[type="button"],
    .btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    #continueBtn {
        width: 100%;
    }
    
    .result {
        padding: 15px;
        margin-top: 20px;
    }
    
    .result h3 {
        font-size: 1.4rem;
    }
    
    .result p {
        font-size: 1rem;
    }
    
    .print-btn,
    .share-btn,
    .view-btn {
        width: 100%;
        margin: 5px 0;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .gallery-link {
        display: block;
        margin: 10px 0;
    }
}

.form-container {
    max-width: 680px;
}

.gallery-link {
    padding: 18px 28px;
}


