* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0c14;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.2);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container-width: 1100px;
    --container-padding: 20px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-300);
    line-height: 1.6;
    background: var(--bg-primary);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

.site-header {
    background: linear-gradient(135deg, #8f989c 0%, #7a8489 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #6b757a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, 
            rgba(255,255,255,0.03) 0px, 
            rgba(255,255,255,0.03) 2px,
            transparent 2px, 
            transparent 8px);
    pointer-events: none;
}

.site-header::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
    animation: floatGlow 15s infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    100% { transform: translate(-30px, 30px) scale(1.2); opacity: 0.5; }
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.header-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none;
}

.header-icon i {
    font-size: 70px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
    transition: all 0.3s ease;
    animation: subtlePulse 4s infinite ease-in-out;
}

@keyframes subtlePulse {
    0% {
        color: rgba(255, 255, 255, 0.9);
        filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
    }
    50% {
        color: rgba(255, 215, 0, 0.8);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    }
    100% {
        color: rgba(255, 255, 255, 0.9);
        filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
    }
}

.header-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 1px 0 rgba(255,255,255,0.4),
        0 2px 0 rgba(255,255,255,0.3),
        0 3px 0 rgba(0,0,0,0.1),
        0 4px 0 rgba(0,0,0,0.1),
        0 5px 10px rgba(0,0,0,0.2);
    background: linear-gradient(
        90deg, 
        rgba(255,255,255,0.9) 0%,
        rgba(255,215,0,0.9) 25%,
        rgba(59,130,246,0.9) 50%,
        rgba(255,215,0,0.9) 75%,
        rgba(255,255,255,0.9) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideShine 8s linear infinite;
}

@keyframes slideShine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.header-content h1:hover {
    animation: slideShine 2s linear infinite;
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.header-content p {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: inline-block;
    padding: 8px 30px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.header-content p::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.1),
        transparent
    );
    transform: rotate(30deg);
    animation: glassShine 6s infinite;
}

@keyframes glassShine {
    0% { transform: rotate(30deg) translateX(-100%); }
    20% { transform: rotate(30deg) translateX(100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

.portal-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.login-panel {
    background: var(--bg-tertiary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInScale 0.5s ease;
    margin: 0 auto;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.login-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: iconShine 6s infinite;
}

@keyframes iconShine {
    0% { transform: rotate(45deg) translateX(-100%); }
    20% { transform: rotate(45deg) translateX(100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.login-icon i {
    font-size: 50px;
    color: var(--primary);
    position: relative;
    z-index: 2;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-panel h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.login-panel p {
    color: var(--gray-400);
    margin-bottom: 30px;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    flex: 0 1 auto;
    min-width: 200px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login i {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.btn-login:hover i {
    transform: translateX(5px);
}

.btn-admin {
    background: linear-gradient(135deg, #4b5563, #374151);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    min-width: 160px;
}

.btn-admin:hover {
    background: linear-gradient(135deg, #374151, #1f2937);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.btn-admin i {
    color: #fbbf24;
}

.info-text {
    margin-top: 30px;
    color: var(--gray-500);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.info-text i {
    color: var(--primary);
}

.site-footer {
    background: #e5e7eb;
    color: #374151;
    padding: 48px 0 24px;
    margin-top: 60px;
    border-top: 1px solid #d1d5db;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h4 {
    color: #111827;
    font-size: 1.2rem;
    margin-bottom: 16px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-info h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-info p {
    color: #4b5563;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-info i {
    color: var(--primary);
    width: 20px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #4b5563;
    transition: all var(--transition-normal);
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 8px;
}

.footer-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #d1d5db;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copyright-line {
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.credits-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #6b7280;
    font-size: 0.9rem;
}

.credits-line .copyright-symbol {
    color: var(--primary);
    font-size: 1rem;
    margin: 0 2px;
}

.nfrancis-glow {
    color: #374151;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    position: relative;
}

.nfrancis-glow:hover {
    color: var(--primary);
    text-shadow: 
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 30px var(--primary),
        0 0 40px var(--primary);
    transform: scale(1.05);
    cursor: default;
}

.nfrancis-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.nfrancis-glow:hover::before {
    opacity: 1;
}

/* Desktop (1025px i više) */
@media (min-width: 1025px) {
    .container {
        max-width: var(--container-width);
    }
}

/* Laptop / manji desktop (1024px - 769px) */
@media (max-width: 1024px) and (min-width: 769px) {
    :root {
        --container-width: 95%;
    }
    
    .header-content h1 {
        font-size: 2.8rem;
    }
}

/* Tablet (768px - 481px) */
@media (max-width: 768px) and (min-width: 481px) {
    :root {
        --container-padding: 16px;
    }
    
    .header-content h1 {
        font-size: 2.4rem;
    }
    
    .header-content p {
        font-size: 1rem;
        padding: 6px 20px;
    }
    
    .header-icon {
        width: 80px;
        height: 80px;
    }
    
    .header-icon i {
        font-size: 45px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .footer-info p {
        justify-content: center;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-links a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
        gap: 12px;
    }
}

/* Mobilni (480px i manje) */
@media (max-width: 480px) {
    :root {
        --container-padding: 12px;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .header-content p {
        font-size: 0.85rem;
        padding: 5px 15px;
        letter-spacing: 2px;
    }
    
    .header-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .header-icon i {
        font-size: 40px;
    }
    
    .site-header {
        padding: 40px 0 30px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-login {
        width: 100%;
        min-width: unset;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .login-panel {
        padding: 40px 20px;
    }
    
    .login-panel h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-info h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .footer-info p {
        justify-content: center;
        font-size: 0.85rem;
    }
    
    .footer-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-links a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        margin-top: 25px;
        padding-top: 18px;
        gap: 10px;
    }
    
    .copyright-line {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .credits-line {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
    
    .nfrancis-glow {
        font-size: 0.85rem;
        padding: 2px 6px;
    }
}

/* iPhone SE i manji (375px i manje) */
@media (max-width: 375px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-content p {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
    }
    
    .header-icon i {
        font-size: 35px;
    }
    
    .footer-links a {
        width: 34px;
        height: 34px;
    }
}

/* Landscape orijentacija za mobilne */
@media (max-width: 900px) and (orientation: landscape) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 0.9rem;
    }
    
    .header-icon {
        width: 70px;
        height: 70px;
    }
    
    .header-icon i {
        font-size: 40px;
    }
}

/* Touch optimizacija za mobilne */
@media (hover: none) and (pointer: coarse) {
    .btn-login:hover,
    .footer-links a:hover {
        transform: none;
        background: transparent;
    }
    
    .btn-login:active,
    .footer-links a:active {
        background: rgba(59, 130, 246, 0.2);
        transform: scale(0.98);
    }
    
    .nfrancis-glow:hover {
        transform: none;
    }
}