/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Winky Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 20px;
    position: relative;
}

@media (max-width: 630px) {
    html {
        height: 100%;
        height: 100dvh; /* Dynamic viewport height */
        overflow: hidden;
    }
    
    body {
        padding: 0px;
        margin: 0px;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
}


/* Container wrapper to ensure phone stays in bounds */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

/* Phone Container */
.phone-container {
    width: 375px;
    height: 812px;
    background: #000;
    border-radius: 40px;
    padding: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform;
}

/* Mobile Responsive Phone */
@media (max-height: 900px) {
    .phone-container {
        height: 100vh;
        width: calc(100vh * 0.462); /* Maintain aspect ratio */
        max-width: 375px;
        min-height: 400px;
    }
}

/* Specific height adjustment for 840px screens */
@media (max-height: 850px) {
    body {
        padding: 10px;
    }
    
    .phone-container {
        height: calc(100vh - 40px);
        width: calc((100vh - 40px) * 0.462);
        max-width: 375px;
        min-height: 350px;
    }
}

@media (max-width: 630px), (max-height: 600px) {
    .phone-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        max-width: none;
        max-height: none;
        border-radius: 0px;
        padding: 0px;
        position: fixed;
        top: 0;
        left: 0;
    }
    
    .phone-screen {
        border-radius: 0px;
        clip-path: none;
    }
    
    .status-bar {
        border-radius: 0px;
        clip-path: none;
    }
    
    .app-modal {
        border-radius: 0px;
        clip-path: none;
    }
    
    .dock-desktop {
        display: none;
    }
    
   
    
    .lock-screen, .home-screen {
        border-radius: 0px;
        clip-path: none;
    }
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background: #000;
    contain: layout style paint;
    clip-path: inset(0 round 32px);
    isolation: isolate;
}

/* Lock Screen */
.lock-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #182765;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    z-index: 100;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 32px;
    overflow: hidden;
    contain: layout style paint;
    clip-path: inset(0 round 32px);
}

.lock-screen.unlocked {
    transform: translateY(-100%);
}

/* Static Status Bar */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    color: white;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px 32px 0 0;
    overflow: hidden;
    contain: layout style paint;
    clip-path: inset(0 round 32px 32px 0 0);
}


.lock-content {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 10;
    letter-spacing: -1px;
}

.time-display {
    font-size: 74px;
    font-weight: 300;
    letter-spacing: -4px;

}

.date-display {
    margin-top:-10px;
    font-size: 18px;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 60px;
}

/* Unlock Section */
.unlock-section {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.unlock-hint {
    cursor:pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.unlock-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.unlock-icon svg {
    width: 100%;
    height: 100%;
}

.unlock-bar {
    width: 140px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.unlock-bar:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
}

.wallpaper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120%;
    height: 88%;
    background: url('lockscreen.svg') center bottom / cover no-repeat;
    z-index: -1;
}


/* Home Screen */
.home-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('backgroundburd.svg') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 32px;
    overflow: hidden;
    contain: layout style paint;
    clip-path: inset(0 round 32px);
}

.home-screen.visible {
    transform: translateY(0);
}

/* Status Bar Elements */
.status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.battery-icon {
    flex-shrink: 0;
}

.status-signal-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

.status-signal-bar {
    width: 3px;
    background: white;
    border-radius: 1px;
}

.status-signal-bar:nth-child(1) { height: 4px; }
.status-signal-bar:nth-child(2) { height: 6px; }
.status-signal-bar:nth-child(3) { height: 8px; }
.status-signal-bar:nth-child(4) { height: 10px; }

/* App Grid */
.app-grid {
    flex: 1;
    padding: 80px 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-content: start;
    max-height: 100%; /* Full height available */
    overflow: hidden;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.app-icon:active {
    transform: scale(0.95);
}

.app-icon-bg {
    width: 60px;
    height: 60px;
   /* background: linear-gradient(135deg, #667eea, #764ba2); */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    margin-bottom: 8px;
    overflow: hidden;
}

.app-icon:hover .app-icon-bg {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3), 0 0 20px rgba(102, 126, 234, 0.6);
}

.app-icon-content {
    font-size: 28px;
    color: white;
}

.app-icon-img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    border-radius: 16px;
}

.app-name {
    font-size: 12px;
    color: white;
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.2px;
text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}

/* Dock */
.dock {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 32px 32px;
    height: 100px;
}

/* Mobile dock - hidden by default */
.dock-mobile {
    display: none;
    position: absolute;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 1001;
    border-radius: 0px;
    padding-top: 10px!important;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 82px;
    justify-content: center;
    gap: 20px;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Show mobile dock and hide desktop dock on small screens */
@media (max-height: 880px) {
    .dock-desktop {
        display: none !important;
    }

    .app-content{
        padding-bottom:155px!important;
    }

    .match-container{
        padding-bottom:110px!important;
    }

    .match-actions{
        padding-top:0px!important;
    }
    
    .dock-mobile {
        display: none !important;
    }
    
    .dock-mobile.visible {
        display: flex !important;
        transform: translateY(-100px);
    }

    .golden-app h1{
        font-size:26px!important;
    }

    .unlock-section{
        padding-bottom:100px!important;
    }

    .golden-app .main-title{
        margin-bottom:0px;
    }

    .call-controls{
        padding-bottom:100px!important;
    }
}

.dock-app {
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.dock-app:active {
    transform: scale(0.95);
}

/* App Modal */
.app-modal {
    position: absolute;
    top: 44px;
    left: 0;
    width: 100%;
    height: calc(100% - 44px);
    background: #f8f9fa;
    z-index: 1003;
    transform: scale(0) translateY(50px);
    opacity: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
    contain: layout style paint;
    clip-path: inset(0 round 0 0 32px 32px);
    transform-origin: center center;
    margin: 0;
    padding: 0;
    will-change: transform, opacity;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #182765;
    border-radius: 50%;
    font-size: 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(178, 209, 220, 0.3);
}

.close-btn:hover {
    background: #a0c4d0;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(178, 209, 220, 0.4);
}

.modal-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: white;
    position: relative;
    margin: 0;
    height: 100%;
}

/* App Content Styles */
.app-content {
    background: transparent;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Golden App Styles */
.golden-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: url('egg.png') center/cover no-repeat;
    padding: 20px 20px 20px 20px;
    padding-top: 50px;
    color: #333;
    overflow-y: auto;
    background-position: bottom;
    padding-bottom:200px;
}

.golden-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(3px);
    pointer-events: none;
    z-index: 0;
}

.golden-app > * {
    position: relative;
    z-index: 1;
}

.main-title {
    text-align: center;
    margin-bottom: 20px;
}

.main-title h1 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    color: #e2d27f;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5),
                 -1px -1px 1px rgba(0, 0, 0, 0.5),
                 1px -1px 1px rgba(0, 0, 0, 0.5),
                 -1px 1px 1px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height:34px;
}

.quest-title {
    text-align: center;
    margin-bottom: 20px;
    line-height:15px;
}

.quest-title-img {
    max-width: 280px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gif-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    flex-shrink: 0;
    position: relative;
    overflow:hidden;
    max-width: 280px;
    max-height: 280px;
    border-radius:20px;

}

.golden-gif {
 
    width: auto;
    height: auto;
    border-radius: 20px;
box-shadow: 0 8px 32px rgba(218, 191, 87, 0.38), 0 1.5px 6px rgba(0,0,0,0.5);
}

.burd-overlay {
    position: absolute;
    bottom: -50px;
    right: -70px;
    width: 185px;
    z-index: 10;
    border-radius:20px;
}

.mint-section {
    text-align: center;
    margin: 20px 0;
}

.mint-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    padding: 0;
}

.mint-btn-img {
    max-width: 400px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    content: url('minthover.png');
}

.mint-btn:hover .mint-btn-img {
    content: url('mint.png');
}

.sale-info {
    background: linear-gradient(135deg, rgba(218, 191, 87, 0.7) 0%, rgba(236, 222, 141, 0.7) 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(218, 191, 87, 0.3);
    border: 2px solid rgba(218, 191, 87, 0.6);
    flex-shrink: 0;
}

.price-info, .supply-info, .minted-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.price-info:last-child, .supply-info:last-child, .minted-info:last-child {
    border-bottom: none;
}

.price-label, .supply-label, .minted-label {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 700;
    color: #e2d27f;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4),
                 -1px -1px 1px rgba(0, 0, 0, 0.4),
                 1px -1px 1px rgba(0, 0, 0, 0.4),
                 -1px 1px 1px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    font-size: 14px;
}

.price-value, .supply-value, .minted-value {
    font-weight: 700;
    color: #361a06;
    font-size: 16px;
}

.egg-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.info-card {
    background: linear-gradient(135deg, rgba(218, 191, 87, 0.7) 0%, rgba(236, 222, 141, 0.7) 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(218, 191, 87, 0.3);
    border: 2px solid rgba(218, 191, 87, 0.6);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(218, 191, 87, 0.5);
}

.info-card h3 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 16px;
    font-weight: 700;
    color: #e2d27f;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4),
                 -1px -1px 1px rgba(0, 0, 0, 0.4),
                 1px -1px 1px rgba(0, 0, 0, 0.4),
                 -1px 1px 1px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.info-card h3 i {
    color: #b8860b;
    font-size: 14px;
}

.info-card p {
    font-size: 14px;
    color: #5d4037;
    margin: 0;
    line-height: 1.4;
}

/* Burdify Music App Styles */
.burdify-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px 20px 20px 20px;
    padding-top: 40px;
    color: white;
    overflow-y: auto;
}

.album-art-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.album-art {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.song-info {
    text-align: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.song-title {
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.artist-name {
    font-size: 18px;
    color: #b0b0b0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.time-elapsed, .time-remaining {
    font-size: 14px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', monospace;
    min-width: 35px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #333;
    border-radius: 2px;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 42%;
    background: #00ff88;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.play-pause {
    background: white;
    color: black;
    font-size: 24px;
    width: 60px;
    height: 60px;
}

.control-btn.active {
    color: #00ff88;
}

.control-btn:hover {
    transform: scale(1.1);
}

.bottom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* About App Styles */
.about-app {
    position: relative;
    padding-top: 55px;
    background: white;
}

.about-avatar-container {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1f2658;
    box-shadow: 0 8px 24px rgba(31, 38, 88, 0.4);
    background: white;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top:10px;
}

.about-content p{
    margin-bottom:5px!important;

}

.token-info, .burd-character, .family-info, .mission {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
}

.section-title i {
    color: #1f2658;
}

.token-info {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.token-details {
    flex: 1;
    width: 100%;
}

.token-info h3, .burd-character h3, .family-info h3, .mission h3 {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-info h3 i, .burd-character h3 i, .family-info h3 i, .mission h3 i {
    color: #1f2658;
}

.token-info p, .burd-character p, .family-info p, .mission p {
    color: #6c757d;
    margin: 8px 0;
    line-height: 1.5;
}

.burd-character ul {
    margin: 10px 0;
    padding-left: 20px;
}

.burd-character li {
    color: #6c757d;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.burd-character li i {
    color: #1f2658;
    width: 16px;
}

/* Blue Button Styles */
.gallery-btn, .compose-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.gallery-btn:hover, .compose-btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.compose-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    font-size: 16px;
}

.app-content h2 {
    color: #333;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-content h2 i {
    color: #007AFF;
    font-size: 20px;
}

.app-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '✓';
    color: #667eea;
    font-weight: bold;
    margin-right: 8px;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Ensure all content stays within phone bounds */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Force containment for all animated elements */
.lock-screen,
.home-screen,
.app-modal {
    transform-origin: center center;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Ensure app grid and dock stay within bounds */
.app-grid,
.dock,
.status-bar {
    overflow: hidden;
}

/* Native App Styles */

/* BurdTube Styles */
.burdtube-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.search-bar {
    padding: 10px 50px 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    background: white;
    font-size: 16px;
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    color: #666;
}

.video-grid {
    flex: 1;
    padding: 10px 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    overflow-y: auto;
}

.video-card.full-width {
    width: 100%;
}

.video-thumbnail-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
    height: fit-content;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 12px;
}

.video-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
    line-height: 1.3;
}

.channel {
    font-size: 12px;
    color: #666;
    margin: 0 0 2px 0;
}

.views {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Gallery Styles */
.gallery-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.gallery-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.gallery-actions {
    display: flex;
    gap: 10px;
}

.gallery-btn {
    padding: 8px 16px;
    border: none;
    background: #007AFF;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.photo-grid {
    flex: 1;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    grid-auto-rows: min-content;
}

.photo-item {
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #e0e0e0, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* Call Screen Styles */
.call-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 0;
}

.call-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    min-height: 0;
}

.contact-info h2 {
    font-size: 28px;
    font-weight: 300;
    margin: 15px 0 8px 0;
    color: white;
}

.call-status {
    font-size: 16px;
    opacity: 0.8;
    margin: 0 0 10px 0;
}

.call-timer {
    font-size: 24px;
    font-weight: 300;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 2px;
    margin: 10px 0;
}

.contact-avatar-large {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.contact-image {
    width: 180%;
    height: 180%;
    object-fit: cover;
    border-radius: 50%;
}

.call-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
}

.call-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.call-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hangup-btn {
    background: #ff3b30;
    border-color: #ff3b30;
}

.hangup-btn:hover {
    background: #ff2d55;
    border-color: #ff2d55;
}

.mute-btn.active {
    background: #ff9500;
    border-color: #ff9500;
}

.speaker-btn.active {
    background: #34c759;
    border-color: #34c759;
}

/* Messages Styles */
.messages-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.messages-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.compose-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #007AFF;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

.conversations {
    flex: 1;
    overflow-y: auto;
}

.conversation {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.conversation:hover {
    background-color: #f8f9fa;
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007AFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.last-message {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Burd Match App Styles */
.match-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    overflow: hidden;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.match-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-header h2 i {
    color: #ff4757;
}

.match-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-right:45px;
}

.match-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.profile-card {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: grab;
    user-select: none;
}

.profile-card:active {
    cursor: grabbing;
}

.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.profile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    color: white;
}

.profile-info h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.profile-info p {
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.4;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.profile-info p:first-of-type {
    font-size: 20px;
    font-weight: 600;
    opacity: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.match-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
}

.action-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.dislike-btn {
    background: white;
    color: #ff4757;
}

.dislike-btn:hover {
    background: #ff4757;
    color: white;
    transform: scale(1.1);
}

.dislike-btn:active {
    background: #ff4757;
    color: white;
    transform: scale(0.95);
}

.like-btn {
    background: #2ed573;
    color: white;
}

.like-btn:hover {
    background: #1e90ff;
    transform: scale(1.1);
}

.like-btn:active {
    background: #1e90ff;
    color: white;
    transform: scale(0.95);
}

.match-results {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.result-content h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: white;
}

.result-content p {
    font-size: 16px;
    margin: 0 0 30px 0;
    opacity: 0.8;
    line-height: 1.5;
}

.restart-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: white;
    color: #ff6b6b;
    transform: translateY(-2px);
}

/* Swipe animations */
.profile-card.swipe-left {
    transform: translateX(-100%) rotate(-30deg);
    opacity: 0;
    transition: all 0.3s ease;
}

.profile-card.swipe-right {
    transform: translateX(100%) rotate(30deg);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .phone-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 0;
    }
    
    .phone-screen {
        border-radius: 0;
    }
}
