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

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

/* Safari mobile viewport fix */
@supports (-webkit-touch-callout: none) {
    .background-container {
        height: 100vh;
        height: 100dvh;
        height: -webkit-fill-available;
    }
}

.background-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Modern dynamic viewport height */
    background-image: url('./images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 3rem;
}

.overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

.social-links {
    display: flex;
    gap: 2rem;
    flex-direction: row;
    position: relative;
    z-index: 1;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.social-link span {
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    
    .social-links {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .social-link {
        padding: 1.2rem;
    }
    
    .social-link i {
        font-size: 2rem;
    }
    
    .social-link span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .background-container {
        background-attachment: scroll;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        padding: 0.8rem;
        min-width: 100px;
    }
    
    .social-link i {
        font-size: 1.6rem;
    }
    
    .social-link span {
        font-size: 0.7rem;
    }
}

/* Safari-specific padding only */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 480px) {
        .overlay {
            padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        }
    }
    
    @media (max-width: 768px) and (min-width: 481px) {
        .overlay {
            padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
        }
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .overlay {
        padding-bottom: 1.5rem;
    }
    
    .social-links {
        flex-direction: row;
        gap: 2rem;
    }
    
    .social-link {
        padding: 0.8rem 1.2rem;
    }
    
    .social-link i {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
    
    .social-link span {
        font-size: 0.8rem;
    }
}