:root {
    --primary: #0b0d64;
    --secondary: #1f13cc85;
    --accent: #ec0c0c;
    --light: #f5f5f5;
    --dark: #333;
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #4a2a7a, #6a3a9a);
    }
}
body {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--light);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 15px;
    padding-top: calc(15px + var(--safe-area-inset-top));
    padding-bottom: calc(15px + var(--safe-area-inset-bottom));
}

/* Safe area handling for Dynamic Island */
@supports(padding: max(0px)) {
    body {
        padding-top: max(15px, var(--safe-area-inset-top));
        padding-bottom: max(15px, var(--safe-area-inset-bottom));
    }
}

/* Mobile Header */
header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    padding-top: var(--safe-area-inset-top);
}

/* Rest of your CSS remains the same */
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    color: white;
    text-decoration: none;
    margin-top: var(--safe-area-inset-top);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    position: absolute;
    right: 15px;
    top: calc(15px + var(--safe-area-inset-top));
}


/* Additional fix for full-height elements */
.photo-container {
    height: calc(60vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom));
}

/* Footer adjustments */
footer {
    padding-bottom: var(--safe-area-inset-bottom);
}

nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 10px;
    text-align: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

nav.active ul {
    max-height: 500px;
}

nav a {
    display: block;
    padding: 12px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Social Links */
.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: transform 0.2s;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Photo Album */
.photo-album {
    margin: 0 auto 40px;
    width: 100%;
}

.photo-container {
    width: 100%;
    height: 60vh;
    min-height: 300px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.photo.active {
    opacity: 1;
}

.photo-caption {
    text-align: center;
    margin: 15px 0;
    padding: 0 10px;
    font-size: 1rem;
}

/* Touch Controls */
.album-controls {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.album-controls button {
    padding: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    touch-action: manipulation;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (min-width: 768px) {
    /* Tablet/Desktop Overrides */
    body {
        padding: 20px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .menu-btn {
        display: none;
    }
    
    nav ul {
        flex-direction: row;
        justify-content: center;
        max-height: none;
    }
    
    nav a {
        padding: 8px 15px;
    }
}

