/* ========================================
   SGOU DIGI GURU - Landing Page Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #1a0d2e;
    --bg-secondary: #2d1b69;
    --bg-card: #3d2a6f;
    --bg-glass: rgba(61, 42, 111, 0.95);
    --border-color: rgba(168, 85, 247, 0.3);
    
    --color-primary: #c026d3;
    --color-primary-light: #d946ef;
    --color-secondary: #a855f7;
    --color-accent: #06b6d4;
    --color-accent-soft: #22d3ee;
    
    --text-primary: #FFFFFF;
    --text-secondary: #e9d5ff;
    --text-muted: #c4b5fd;
    
    /* Shadows */
    --shadow-card: 0 4px 20px rgba(168, 85, 247, 0.3);
    --shadow-hover: 0 8px 32px rgba(192, 38, 211, 0.5);
    --shadow-neon: 0 0 20px rgba(217, 70, 239, 0.6);
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #1a0d2e 0%, #2d1b69 50%, #1a0d2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Header */
.landing-header {
    padding: var(--spacing-lg) var(--spacing-md);
    background: rgba(26, 13, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-neon);
}

.header-text {
    flex: 1;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

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

/* Main Content */
.landing-main {
    padding: var(--spacing-2xl) var(--spacing-md);
    position: relative;
    z-index: 1;
}

.landing-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInUp 0.6s ease-out;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.welcome-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--spacing-2xl);
    animation: fadeIn 0.3s ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: #ff6b6b;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.error-state p {
    font-size: 1.1rem;
}

/* Units Grid */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* Unit Card */
.unit-card {
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.2), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.unit-card:hover::before {
    opacity: 1;
}

.unit-card-content {
    position: relative;
    z-index: 1;
}

.unit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-card);
}

.unit-icon i {
    font-size: 1.75rem;
    color: white;
}

.unit-thumbnail {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-card);
}

.unit-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.unit-card:hover .unit-thumbnail img {
    transform: scale(1.05);
}

.unit-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.unit-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.unit-info i {
    color: var(--color-accent);
}

.unit-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.unit-action-text {
    color: var(--color-primary-light);
    font-weight: 600;
    font-size: 0.95rem;
}

.unit-action i {
    color: var(--color-primary-light);
    transition: transform 0.3s ease;
}

.unit-card:hover .unit-action i {
    transform: translateX(4px);
}

/* Background Effects */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #c026d3, transparent);
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a855f7, transparent);
    bottom: -150px;
    left: -150px;
    animation: float 25s ease-in-out infinite reverse;
}

.glow-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #06b6d4, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 30s ease-in-out infinite;
}

/* Floating Particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(168, 85, 247, 0.5);
    border-radius: 50%;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; }
.particle:nth-child(3) { left: 40%; animation-delay: 4s; }
.particle:nth-child(4) { left: 60%; animation-delay: 1s; }
.particle:nth-child(5) { left: 75%; animation-delay: 3s; }
.particle:nth-child(6) { left: 90%; animation-delay: 5s; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(50px, 50px);
    }
    50% {
        transform: translate(0, 100px);
    }
    75% {
        transform: translate(-50px, 50px);
    }
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    50% {
        transform: translateY(-100vh) translateX(50px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-logo {
        width: 50px;
        height: 50px;
    }
    
    .header-title {
        font-size: 1.5rem;
    }
    
    .header-subtitle {
        font-size: 0.85rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-description {
        font-size: 1rem;
    }
    
    .units-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .landing-main {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.25rem;
    }
    
    .welcome-title {
        font-size: 1.75rem;
    }
    
    .unit-card {
        padding: var(--spacing-lg);
    }
}
