/* style.css - Design System and Styles for ZWorkHub Portal */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Sarabun:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(15, 22, 42, 0.45);
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --secondary: #a855f7;
    --secondary-glow: rgba(168, 85, 247, 0.35);
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Sarabun', 'Outfit', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Ambient Background Lights */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    animation: pulse 12s infinite alternate;
}

.glow-2 {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    bottom: -200px;
    right: -100px;
    animation: pulse 15s infinite alternate-reverse;
}

.glow-3 {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(50px, 30px); }
}

/* Header Section */
header {
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    font-family: 'Outfit', sans-serif;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.header-time {
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-glass);
}

/* Main Content Wrapper */
main {
    flex-grow: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    width: 100%;
    z-index: 10;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Portal Grid Layout */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Glassmorphism Card Style */
.portal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Card Glow Hover Effect */
.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 50%, var(--secondary-glow) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
    pointer-events: none;
}

.portal-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(59, 130, 246, 0.15);
}

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

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

/* System Icons */
.system-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 25px;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-card:hover .system-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Active System (OnDuty) Icon Color */
.active-system .system-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Inactive/Lock System Icon Color */
.locked-system .system-icon {
    background: rgba(255, 255, 255, 0.02);
    color: #64748b;
}

.system-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.system-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.card-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.system-status {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-locked {
    background: rgba(241, 245, 249, 0.03);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Launch Buttons */
.btn-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.btn-active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-active:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-locked {
    background: rgba(255, 255, 255, 0.03);
    color: #475569;
    cursor: not-allowed;
    border: 1px solid var(--border-glass);
}

/* Footer Section */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}

.footer-copy {
    font-size: 13px;
    color: #475569;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 20px 24px;
    }
    
    main {
        padding: 40px 16px 60px;
    }
    
    .hero {
        margin-bottom: 40px;
    }
    
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
