/**
 * Highline Adventures - Main Navigation Page
 * Glassmorphic Design
 */

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

:root {
    /* New Color Palette */
    --charcoal-brown: #3F4235;
    --dusty-olive: #767562;
    --powder-blue: #B1C2D2;
    --charcoal-brown-2: #30342E;
    --alabaster-grey: #ECEBE9;

    /* RGB values for alpha manipulation */
    --rgb-charcoal-brown: 63, 66, 53;
    --rgb-dusty-olive: 118, 117, 98;
    --rgb-powder-blue: 177, 194, 210;
    --rgb-charcoal-brown-2: 48, 52, 46;
    --rgb-alabaster-grey: 236, 235, 233;

    /* Glass Physics */
    --glass-opacity: 0.12;
    --glass-blur: 16px;
    --glass-border-opacity: 0.25;

    /* Card styling */
    --card-border-radius: 20px;
}

html {
    overflow: hidden;
    background-color: var(--charcoal-brown-2);
}

body {
    font-family: 'Rubik', 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--charcoal-brown-2);
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
}

/* Keyframe animations */
@keyframes subtleZoom {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.15); }
}

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

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

/* Background utility */
.background-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Main app container */
#app-main {
    background-color: var(--charcoal-brown-2);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Background */
#app-background {
    height: 100vh;
    left: 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    z-index: 1;
}

#app-background-image {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: filter 250ms, transform 250ms;
    background-image: url('bg-pattern.jpg');
    transform: scale(1.1);
}

@media (prefers-reduced-motion: no-preference) {
    #app-background-image {
        animation: subtleZoom 30s ease-in-out infinite alternate;
    }
}

/* App info (time + weather) */
#app-info {
    bottom: 0;
    left: 0;
    margin: 40px;
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-weather-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
}

.time-text {
    font-size: 6rem;
    font-weight: 400;
    color: var(--alabaster-grey);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.temperature-text {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--powder-blue);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.date-text {
    font-size: 2rem;
    font-weight: 400;
    color: var(--dusty-olive);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
    letter-spacing: 8px;
    line-height: 1;
}

/* ============================================================================
   APPLICATION CARDS SECTION
   ============================================================================ */

#app-cards-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    max-width: 1000px;
}

.main-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 600;
    color: var(--alabaster-grey);
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    margin-bottom: 48px;
    letter-spacing: 2px;
}

.app-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 20px;
}

.app-card {
    background: rgba(var(--rgb-charcoal-brown), 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--rgb-dusty-olive), 0.3);
    border-radius: var(--card-border-radius);
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.app-card:hover {
    background: rgba(var(--rgb-charcoal-brown), 0.6);
    border-color: rgba(var(--rgb-powder-blue), 0.6);
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.app-card-icon {
    font-size: 64px;
    color: var(--powder-blue);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.app-card:hover .app-card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(var(--rgb-powder-blue), 0.6));
}

.app-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--alabaster-grey);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.app-card-description {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--dusty-olive);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   MENU ICON & SIDEBAR NAVIGATION
   ============================================================================ */

/* Menu Icon Button (Top Right) */
.menu-icon-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon-btn:hover {
    transform: scale(1.1);
}

.menu-icon-btn .material-symbols-outlined {
    font-size: 32px;
    color: var(--alabaster-grey);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
    transition: all 0.3s ease;
}

.menu-icon-btn:hover .material-symbols-outlined {
    filter: drop-shadow(0 4px 12px rgba(var(--rgb-powder-blue), 0.8));
    color: var(--powder-blue);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--rgb-charcoal-brown-2), 0.8);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Container - Transparent Glassmorphic */
.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
}

.sidebar-header h2 {
    color: var(--powder-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Sidebar Content */
.sidebar-content {
    padding: 20px;
}

/* Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--alabaster-grey);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 6px;
    background: transparent;
    border: none;
    border-radius: 8px;
}

.sidebar-link:hover {
    background: rgba(var(--rgb-dusty-olive), 0.2);
    color: var(--powder-blue);
}

.sidebar-link .material-symbols-outlined {
    font-size: 28px;
    color: var(--powder-blue);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.sidebar-link span:last-child {
    flex: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 960px) {
    .time-text {
        font-size: 5rem;
    }

    .temperature-text,
    .date-text {
        font-size: 1.25rem;
    }

    .date-text {
        letter-spacing: 6px;
    }

    .main-title {
        font-size: 2.5rem;
        margin-bottom: 32px;
    }

    .app-cards-grid {
        gap: 20px;
    }

    .app-card {
        padding: 28px 20px;
    }

    .app-card-icon {
        font-size: 56px;
    }
}

@media (max-width: 768px) {
    .app-cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .main-title {
        font-size: 2rem;
        margin-bottom: 24px;
    }

    .app-card {
        padding: 24px 20px;
    }
}

@media (max-width: 600px) {
    #app-info {
        margin: 20px;
    }

    .time-text {
        font-size: 4rem;
    }

    .temperature-text,
    .date-text {
        font-size: 1.125rem;
    }

    .date-text {
        letter-spacing: 6px;
    }

    .main-title {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }

    .app-card-icon {
        font-size: 48px;
    }

    .app-card-title {
        font-size: 1.25rem;
    }

    .app-card-description {
        font-size: 0.875rem;
    }
}

/* Mobile Sidebar Width Adjustment */
@media (max-width: 480px) {
    .sidebar {
        width: 300px;
        right: -300px;
    }

    .menu-icon-btn {
        top: 16px;
        right: 16px;
    }

    .menu-icon-btn .material-symbols-outlined {
        font-size: 28px;
    }
}

@media (max-width: 400px) {
    .time-text {
        font-size: 3rem;
    }

    .temperature-text,
    .date-text {
        font-size: 1rem;
    }

    .date-text {
        letter-spacing: 6px;
    }

    .main-title {
        font-size: 1.5rem;
    }

    .app-cards-grid {
        padding: 0 10px;
    }
}

/* iPhone SE and similar (375px and below) */
@media (max-width: 375px) {
    .time-text {
        font-size: 2.5rem;
    }

    .temperature-text {
        font-size: 0.95rem;
    }

    .date-text {
        font-size: 0.95rem;
        letter-spacing: 4px;
    }
}
