:root {
    --bg-dark: #090d16;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(28, 38, 60, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(56, 189, 248, 0.4);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --accent-purple: #a855f7;
    --accent-green: #10b981;
    --accent-red: #ff0000;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Background */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #3b82f6, transparent);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    bottom: -200px;
    right: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #06b6d4, transparent);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 80px) scale(1.1); }
    100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* App Container */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* Header Banner */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.2rem;
    font-weight: 500;
}

.time-widget {
    text-align: right;
}

.clock-display {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

.date-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.greeting-text {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.15rem;
    font-weight: 600;
}

/* Dashboard & Media Row */
.dashboard-section {
    width: 100%;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent-purple));
    opacity: 0.8;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.15);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.svc-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
}

.svc-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.svc-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-bottom {
    margin-top: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1rem;
}

.svc-url-preview {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--primary);
}

.card-arrow {
    font-size: 1.1rem;
    color: var(--primary);
    transition: var(--transition-fast);
}

.service-card:hover .card-arrow {
    transform: translateX(5px);
}

/* Media Showcase Row */
.media-showcase-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.5rem;
}

.video-showcase {
    width: 100%;
}

.video-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.video-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.genre-badge {
    font-size: 0.78rem;
    color: #ff4e4e;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.genre-badge.cyan {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.song-url-form {
    width: 100%;
}

.url-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    transition: var(--transition-fast);
}

.url-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.input-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.url-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.url-input-group input::placeholder {
    color: var(--text-dim);
}

.update-btn {
    background: var(--primary);
    border: none;
    color: #0f172a;
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.update-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px var(--primary);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 1.25rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.portal-footer strong {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .time-widget {
        text-align: left;
    }

    .media-showcase-row {
        grid-template-columns: 1fr;
    }

    .url-input-group {
        flex-wrap: wrap;
    }
}
