/* Modern Dark Theme with Blue Gradients - Complete Style Guide Implementation */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    /* Primary Colors */
    --primary-blue: #3B82F6;
    --blue-400: #60A5FA;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    
    /* Gradient Colors */
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    
    /* Background Colors */
    --dark-bg: #0A0A0A;
    --card-bg: rgba(255,255,255,0.05);
    --muted-bg: rgba(0,0,0,0.5);
    
    /* Text Colors */
    --foreground: #FFFFFF;
    --muted-foreground: #9CA3AF;
    --primary-foreground: #FFFFFF;
    
    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 200ms;
    --transition-std: 300ms;
    --transition-med: 500ms;
    --transition-slow: 600ms;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--foreground);
    min-height: 100vh;
    padding: 0;
    position: relative;
    background-image: 
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 30px 30px;
    font-size: 18px;
    line-height: 1.7;
}

/* Professional Website Header */
.site-header {
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.85) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 40px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    justify-content: center;
}

.logo-text {
    font-size: 34px;
    font-weight: 700;
    background: linear-gradient(to right, #D1D5DB, #3B82F6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 14px;
    color: #9CA3AF;
    margin: 0;
    font-weight: 400;
    line-height: 1.2;
}

.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 0 15px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s;
    position: relative;
    border: none;
    background: transparent;
}

.nav-link:hover {
    color: #FFFFFF;
    text-decoration: underline;
    opacity: 0.9;
}

.nav-link.active {
    color: #FFFFFF;
    font-weight: 600;
    text-decoration: underline;
}

/* Add pipe separators between nav links */
.nav-link:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -3px;
    color: #FFFFFF;
    font-weight: 300;
    opacity: 0.5;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-badge {
    color: #FFFFFF;
    font-size: 15px;
    padding: 0 8px 0 0;
    font-weight: 400;
    background: transparent;
    border: none;
}

.header-btn {
    color: #FFFFFF;
    text-decoration: none;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 400;
    background: transparent;
    border: none;
    transition: all 0.2s;
    position: relative;
}

.header-btn:hover {
    color: #FFFFFF;
    text-decoration: underline;
    opacity: 0.9;
}

.header-separator {
    color: #FFFFFF;
    font-weight: 300;
    padding: 0 5px;
    font-size: 15px;
    opacity: 0.5;
}

.logout-btn {
    color: #FFFFFF;
}

.logout-btn:hover {
    color: #FFFFFF;
    text-decoration: underline;
    opacity: 0.8;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    margin-top: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 60px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 10px 30px -5px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.08) inset,
        0 20px 25px -5px rgba(0,0,0,0.15);
    transition: all var(--transition-std) ease;
}

h1 {
    background: linear-gradient(
        135deg,
        #FFFFFF 0%,
        #E5E7EB 20%,
        #D1D5DB 40%,
        #93C5FD 60%,
        #60A5FA 80%,
        #3B82F6 100%
    );
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 30px;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    filter: drop-shadow(0 0 10px rgba(147,197,253,0.7));
    letter-spacing: -2px;
    line-height: 1.1;
    animation: flowingWater 8s ease-in-out infinite;
    -webkit-animation: flowingWater 8s ease-in-out infinite;
    -moz-animation: flowingWater 8s ease-in-out infinite;
}

/* Flowing water animation for gradient text */
@keyframes flowingWater {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 25%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-webkit-keyframes flowingWater {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 25%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-moz-keyframes flowingWater {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 25%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

h2 {
    background: linear-gradient(
        135deg,
        #F3F4F6 0%,
        #E5E7EB 25%,
        #93C5FD 50%,
        #60A5FA 75%,
        #3B82F6 100%
    );
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 50px;
    margin-top: 40px;
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    filter: drop-shadow(0 0 8px rgba(147,197,253,0.5));
    animation: flowingWater 10s ease-in-out infinite;
    -webkit-animation: flowingWater 10s ease-in-out infinite;
    -moz-animation: flowingWater 10s ease-in-out infinite;
}

h3 {
    background: linear-gradient(
        to right,
        #E5E7EB 0%,
        #93C5FD 50%,
        #60A5FA 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 40px 0 25px 0;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 0 6px rgba(147,197,253,0.4));
}

h4 {
    color: var(--gray-400);
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

.subtitle {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 60px;
    margin-top: 20px;
    font-size: 1.4rem;
    line-height: 1.6;
    font-weight: 500;
}

.upload-section {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(59,130,246,0.3);
    border-radius: 16px;
    padding: 60px;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 40px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: var(--blue-400);
    box-shadow: 0 0 20px rgba(59,130,246,0.3);
}

label {
    display: block;
    margin-bottom: 20px;
    margin-top: 10px;
    color: var(--gray-300);
    font-weight: 600;
    font-size: 1.3rem;
}

input[type="file"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
textarea,
select {
    width: 100%;
    margin: 20px 0;
    padding: 18px 20px;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(59,130,246,0.3);
    border-radius: 16px;
    color: var(--foreground);
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue-400);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 20px rgba(59,130,246,0.4), inset 0 0 10px rgba(59,130,246,0.1);
    transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
    color: rgba(156, 163, 175, 0.5);
    font-weight: 300;
}

/* Hover state for inputs */
input:hover:not(:focus),
textarea:hover:not(:focus),
select:hover:not(:focus) {
    border-color: rgba(59,130,246,0.5);
    background: rgba(255,255,255,0.04);
}

/* Autofill styles - prevent bright white background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px rgba(31, 41, 55, 0.95) inset !important;
    -webkit-text-fill-color: #D1D5DB !important;
    background-color: rgba(31, 41, 55, 0.95) !important;
    border: 2px solid rgba(59,130,246,0.3) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Filled input state - use gray background instead of white */
input:not(:placeholder-shown),
textarea:not(:placeholder-shown) {
    background: rgba(31, 41, 55, 0.3) !important;
    border-color: rgba(59,130,246,0.35);
}

input:not(:placeholder-shown):focus,
textarea:not(:placeholder-shown):focus {
    background: rgba(31, 41, 55, 0.4) !important;
    border-color: var(--blue-400);
}

button {
    background: var(--primary-blue);
    color: white;
    border: 2px solid var(--blue-500);
    padding: 18px 36px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.85;
    transition: all 0.3s ease;
    margin: 15px 8px;
    letter-spacing: 0.5px;
}

button:hover:not(:disabled) {
    background: transparent;
    border-color: var(--blue-400);
    color: var(--blue-400);
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 25px rgba(59,130,246,0.5);
    transition: all var(--transition-std) ease;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.file-info {
    margin-top: 10px;
    font-weight: 500;
    font-size: 1em;
    color: var(--blue-400);
}

.processing-indicator {
    background: rgba(59,130,246,0.1);
    border: 2px solid var(--blue-500);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.processing-indicator p {
    margin: 10px 0;
    color: var(--blue-400);
    font-weight: 500;
}

.processing-detail {
    font-size: 0.9em;
    color: var(--muted-foreground) !important;
    font-weight: normal !important;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--blue-500);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
}

.results {
    margin-top: 40px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(59,130,246,0.3);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: scale(1.02) translateY(-4px);
    border-color: var(--blue-400);
    box-shadow: 0 0 25px rgba(59,130,246,0.5);
}

.metric-card h3 {
    font-size: 0.85em;
    color: var(--muted-foreground);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.8em;
    font-weight: bold;
    background: linear-gradient(to right, var(--blue-400), var(--blue-500));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 30px;
    margin-top: 20px;
    font-style: italic;
    font-size: 1.05em;
    line-height: 1.6;
}

.frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.frame-item {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.frame-item:hover {
    transform: scale(1.02);
    border-color: var(--blue-400);
    box-shadow: 0 0 15px rgba(59,130,246,0.4);
}

.frame-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.frame-label {
    margin-top: 10px;
    color: var(--muted-foreground);
    font-size: 0.9em;
    font-family: monospace;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chart-container {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--blue-500);
}

.stats-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.stats-widget.minimized {
    background: none;
    border: none;
    padding: 0;
}

.earth-icon {
    font-size: 25px;
    cursor: pointer;
    transition: transform 0.6s ease;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(59,130,246,0.6));
}

.earth-icon:hover {
    transform: rotate(360deg) scale(1.1);
    filter: drop-shadow(0 0 15px rgba(59,130,246,0.9));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stats-widget-content {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 12px;
    padding: 16px;
    min-width: 250px;
    box-shadow: 0 0 30px rgba(59,130,246,0.4);
    margin-top: 10px;
    animation: fadeInDown 0.3s ease;
}

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

.stats-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 10px 0;
    user-select: none;
}

.stats-widget.minimized .stats-widget-header {
    margin: 0;
}

.stats-widget-title {
    font-size: 0.85em;
    margin: 0;
    color: var(--blue-400);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-widget-controls {
    display: flex;
    gap: 6px;
    margin-left: 20px;
}

.widget-control-btn {
    background: rgba(59,130,246,0.2);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60A5FA;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.widget-control-btn:hover {
    background: rgba(59,130,246,0.3);
    border-color: #60A5FA;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(59,130,246,0.3);
}

.stats-widget .stat-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stats-widget .stat-label {
    color: var(--muted-foreground);
    font-size: 0.75em;
}

.stats-widget .stat-value {
    color: var(--blue-400);
    font-weight: 600;
    font-size: 0.8em;
}

.social-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--blue-500);
    border-radius: 12px;
    padding: 16px;
    min-width: 300px;
    animation: slideInRight 0.5s ease;
    box-shadow: 0 0 25px rgba(59,130,246,0.5);
    z-index: 999;
}

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

.celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    animation: celebrate 2s ease;
    pointer-events: none;
    z-index: 9999;
}

@keyframes celebrate {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

.footer {
    background: rgba(0,0,0,0.9);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 80px;
    padding: 30px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-brand h3 {
    background: linear-gradient(to right, #D1D5DB, #3B82F6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2em;
    margin: 0;
    font-weight: 700;
}

.footer-brand p {
    color: #9CA3AF;
    font-size: 0.85em;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-links a {
    color: #E5E7EB;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    padding: 0 15px;
}

.footer-links a:hover {
    color: #60A5FA;
    text-decoration: underline;
}

.footer-links a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -3px;
    color: #6B7280;
    font-weight: 300;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #6B7280;
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .metrics {
        grid-template-columns: 1fr;
    }
    
    .frames-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-widget {
        position: static;
        margin: 20px 0;
    }
    
    /* Header responsive */
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
        gap: 20px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-user {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* Footer Styles - Consistent across all pages */
footer {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.95) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(59,130,246,0.2);
    color: white;
    padding: 40px 20px 20px;
    margin-top: 80px;
    position: relative;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 25px;
}

.footer-logo-text {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(to right, #D1D5DB, #3B82F6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.footer-logo-tagline {
    font-size: 16px;
    color: #9CA3AF;
    margin: 0;
    font-weight: 400;
    line-height: 1.2;
}

.footer-section {
    margin: 15px 0;
    color: #E5E7EB;
    font-size: 15px;
    font-weight: 400;
}

.footer-section a {
    color: #E5E7EB;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 0 15px;
    position: relative;
}

.footer-section a:hover {
    color: #60A5FA;
    text-decoration: underline;
}

.footer-section a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -3px;
    color: #6B7280;
    font-weight: 300;
}

.footer-section.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #9CA3AF;
    font-size: 14px;
}

.footer-section .confidential {
    color: #F87171;
    font-weight: 500;
}
