/* Modern Dark Theme CSS for Script.mk Login System */

:root {
    --primary-color: #6366f1;
    --primary-hover: #5855eb;
    --secondary-color: #8b5cf6;
    --background-dark: #0f0f23;
    --background-card: #1a1a2e;
    --background-input: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #374151;
    --border-focus: #6366f1;
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 50%);
    z-index: -1;
    /* animation: backgroundShift 15s linear infinite; */
}

@keyframes backgroundShift {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    25% { transform: translateX(-30px) translateY(-15px) rotate(1deg); }
    50% { transform: translateX(30px) translateY(15px) rotate(-1deg); }
    75% { transform: translateX(-15px) translateY(30px) rotate(0.5deg); }
    100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1400px;
    width: 100%;
    background: var(--background-card);
    border-radius: 25px;
    padding: 0px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    min-height: 600px;
    position: relative;
}

.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px;
    grid-column: 1;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
    animation: iconPulse 2s ease-in-out infinite;
}

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

.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 40px;
    background: rgba(26, 26, 46, 0.3);
    margin-left: -60px;
    margin-right: -60px;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.sub-description {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    margin-top: 20px;
    line-height: 1.6;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    background: var(--background-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.login-btn::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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.form-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-top: 20px;
}

/* Slide description (same base styling as form-footer, isolated) */
.slide-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--text-primary);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-hover);
}

/* Advertisement Section */
.advertisement-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    grid-column: 2;
}

/* Vertical Divider */
.login-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 41%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 80%;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
    z-index: 1;
}

.ad-container {
    width: 100%;
    max-width: 100%;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
}

/* Vertical Swiper presentation (desktop max 800px) */
.advertisement-section .ad-container { max-width: 700px; }
.advertisement-section .ad-container .swiper { width: 100%; }
.advertisement-section .ad-container .swiper-slide { display: flex; align-items: center; justify-content: center; }
.advertisement-section .ad-container .slider-item { text-align: center; }
.advertisement-section .ad-container .slider-item .media { margin-bottom: 18px; }
.advertisement-section .ad-container .swiper .ad-image { width: 100% !important; max-width: 800px; height: auto !important; min-width: 0; min-height: 0; max-height: none; object-fit: contain; border-radius: 0 0 14px 14px; }
#sliderDots, .swiper-pagination { margin-top: 26px; }

/* Title/description spacing inside slider */
.advertisement-section .ad-container .slider-item h4 { margin: 10px 0 6px; }
.advertisement-section .ad-container .slider-item .slide-description { margin-top: 6px; margin-bottom: 16px; }
.advertisement-section .ad-container .slider-item .ad-cta-btn { margin-top: 18px; }

/* Swiper dots inside our custom container */
#sliderDots .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    opacity: 1;
    margin: 0 6px !important;
    transform: scale(1);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#sliderDots .swiper-pagination-bullet-active {
    background: var(--gradient-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    transform: scale(1.15);
}



/* CTA button under each slide */
.ad-cta-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--gradient-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.ad-cta-btn:hover { filter: brightness(1.05); }

@media (max-width: 1024px){
  .advertisement-section .ad-container { max-width: 700px; }
}

@media (max-width: 768px){
  .advertisement-section .ad-container { max-width: 100%; }
}

.ad-container .ad-header,
.ad-container .ad-slider {
    margin-left: auto;
    margin-right: auto;
}

.ad-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-input);
    border-radius: 16px 16px 0 0;
    width: 100%;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
    margin-bottom: 0;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.traffic-light.red {
    background-color: #f87171;
}

.traffic-light.yellow {
    background-color: #fbbf24;
}

.traffic-light.green {
    background-color: #34d399;
}

.live-preview-text {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.ad-container h3 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-slider {
    position: relative;
    width: 300px !important;
    height: 600px !important;
    min-width: 300px;
    max-width: 300px;
    min-height: 600px;
    max-height: 600px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-top: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    margin: 0 auto;
    background: var(--background-card);
    flex-shrink: 0;
    order: 2;
    z-index: 1;
    margin-top: 0;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px !important;
    height: 600px !important;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border: none;
    z-index: 1;
}

.ad-slide.active {
    opacity: 1;
}

.ad-image {
    width: 300px !important;
    height: 600px !important;
    min-width: 300px;
    max-width: 300px;
    min-height: 600px;
    max-height: 600px;
    object-fit: cover;
    border-radius: 0 0 16px 16px;
    transition: transform 0.3s ease;
}

.ad-code {
    width: 300px !important;
    height: 600px !important;
    min-width: 300px;
    max-width: 300px;
    min-height: 600px;
    max-height: 600px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    position: relative;
}

.ad-code iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 16px 16px;
}

/* Google AdSense specific styles */
.ad-code .adsbygoogle {
    width: 100% !important;
    height: 600px !important;
    border-radius: 0 0 16px 16px;
}

/* AdRiver specific styles */
.ad-code script {
    display: block;
}

.ad-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
}

.ad-code:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    order: 3;
    flex-shrink: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: var(--background-dark);
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: var(--background-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-icon {
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
}

.header-content h1 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: var(--text-secondary);
}

.logout-btn {
    background: var(--gradient-secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

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

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

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

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: var(--background-card);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.main-icon {
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0.9;
}

.tech-icons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tech-badge {
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--text-secondary);
    background: rgba(26, 26, 46, 0.5);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.animated-icon {
    /* Static icon - no animation */
}

.progress-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-percentage {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background-input);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.progress-fill[data-status="active"] {
    background: linear-gradient(90deg, var(--success-color), #22c55e);
}

.progress-fill[data-status="building"] {
    background: linear-gradient(90deg, var(--warning-color), #f59e0b);
    animation: buildingPulse 1.5s ease-in-out infinite;
}

.progress-fill[data-status="completed"] {
    background: linear-gradient(90deg, var(--primary-color), #6366f1);
}

@keyframes buildingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-active {
    color: var(--success-color);
}

.status-building {
    color: var(--warning-color);
}

.status-completed {
    color: var(--primary-color);
}

.dashboard-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.card-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.dashboard-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--background-card);
    margin-top: 60px;
}

.dashboard-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.dashboard-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.dashboard-footer a:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 500px;
    }
    
    .login-container::before {
        display: none;
    }
    
    .advertisement-section {
        order: -1;
    }
    
    /* Ad slider remains fixed 300x600 */
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 400px;
        padding: 30px 20px;
    }
    
    .login-container::before {
        display: none;
    }
    
    .advertisement-section {
        order: -1;
    }
    
    /* Ad slider remains fixed 300x600 */
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .login-container {
        padding: 20px 15px;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .ad-slider {
        height: 250px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

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

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

.status-indicator {
    display: flex;
    align-items: center; /* vertical center circle + text */
    justify-content: start; /* keep left aligned */
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
}

.status-indicator span {
    display: inline-flex;
    align-items: center;
}


/* dot base */
.dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
}

/* states */
.dot-active { background-color: #22c55e; }
.dot-building { background-color: #f59e0b; }
.dot-completed { background-color: #3b82f6; }
.dot-inactive { background-color: #6b7280; }

/* Base fill effect (color + motion) */
.progress-fill[data-status="building"] {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    animation: flowGradient 2s linear infinite, buildLoop 4s ease-in-out infinite;
    opacity: 1;
}

/* Gradient flowing inside bar */
@keyframes buildLoop {
  0% {
    width: 0%;
    opacity: 1;
  }
  70% {
    width: var(--build-progress);
    opacity: 1;
  }
  85% {
    width: var(--build-progress);
    opacity: 0;          /* исчезнува додека е пополнет */
  }
  86% {
    width: 0%;           /* се враќа назад, но уште е невидлив */
    opacity: 0;
  }
  87% {
    opacity: 0;           /* краток „off“ момент */
  }
  100% {
    width: 0%;
    opacity: 1;           /* повторно се појавува и почнува нов циклус */
  }
}


