/* Hero Section */
.mango-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)), url('../app/curtainssss.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.mango-hero-content {
    max-width: 800px;
    color: white;
    animation: fadeInUp 1s ease-out;
}

.mango-hero-title {
    font-size: 45px;
    font-weight: 700;
    margin-bottom: 20px;
    background: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.mango-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mango-dive-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 8px 30px;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.mango-dive-btn:hover {
    background: white;
    color: #0066ff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

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

/* Lightbox Overlay */
.mango-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mango-lightbox-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Lightbox Container */
.mango-lightbox-container {
    width: 95%;
    max-width: 1600px;
    height: 90vh;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: popupAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupAppear {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.mango-lightbox-content {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Close Button */
.mango-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mango-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Mobile Panel (Left Side) */
.mango-mobile-panel {
    flex: 0.3;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

.mango-mobile-device {
    width: 100%;
    max-width: 390px;
    background: #111;
    border-radius: 40px;
    padding: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    position: relative;
    border: 8px solid #222;
}

.mango-device-frame {
    width: 100%;
    height: 80vh;
    border-radius: 32px;
    overflow: hidden;
    background: #000;
}

/* Device Header */
.mango-device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 5px;
    background: #000;
    color: white;
    font-size: 0.9rem;
    position: relative;
}

.mango-device-notch {
    width: 100px;
    height: 25px;
    background: #000;
    border-radius: 0 0 15px 15px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.mango-device-icons {
    display: flex;
    gap: 8px;
}

/* Device Screen */
.mango-device-screen {
    padding: 20px;
    color: white;
    height: calc(100% - 100px);
    overflow-y: auto;
}

/* App Header */
.mango-app-header {
    text-align: center;
    margin-bottom: 25px;
}

.mango-app-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mango-app-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.mango-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mango-status-dot.mango-syncing {
    background: #4CAF50;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Curtain Animation */
.mango-curtain-animation {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mango-window-frame {
    width: 100%;
    height: 110px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.mango-window-top, .mango-window-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.mango-window-top {
    top: 0;
    border-radius: 8px 8px 0 0;
}

.mango-window-bottom {
    bottom: 0;
    border-radius: 0 0 8px 8px;
}

.mango-curtain-track {
    position: absolute;
    top: 20px;
    left: 10px;
    right: 10px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.mango-curtain-container {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    overflow: hidden;
}

.mango-curtain {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #8B4513, #A0522D, #D2691E);
    transition: width 0.1s linear;
    border-radius: 3px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.mango-curtain-folds {
    display: flex;
    height: 100%;
    padding: 0 10px;
}

.mango-fold {
    flex: 1;
    border-right: 2px solid rgba(0, 0, 0, 0.3);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.mango-fold:last-child {
    border-right: none;
}

.mango-animation-info {
    display: none;
    justify-content: space-between;
    align-items: center;
}

.mango-animation-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.mango-timer-icon {
    font-size: 1.2rem;
}

.mango-timer-value {
    font-weight: 600;
    color: #4CAF50;
}

.mango-animation-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Position Display */
.mango-position-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mango-position-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mango-label-icon {
    font-size: 1rem;
}

.mango-position-value {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 15px;
    color: #4CAF50;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.mango-percent {
    font-size: 20px;
    opacity: 0.8;
}

.mango-position-indicator {
    margin-top: 10px;
    display: none;
}

.mango-indicator-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.mango-indicator-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 100%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.mango-indicator-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Control Panel */
.mango-control-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.mango-panel-title {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.mango-control-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.mango-control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.mango-control-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.mango-control-btn.mango-active {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.mango-control-btn.mango-active:hover {
    background: rgba(76, 175, 80, 0.3);
}

.mango-btn-icon {
    font-size: 1.3rem;
}

/* Speed Control */
.mango-speed-control {
    margin-top: 15px;
}

.mango-speed-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.mango-speed-slider {
    margin-bottom: 5px;
}

.mango-speed-slider-input {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.mango-speed-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.mango-speed-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
}

.mango-speed-current {
    color: #4CAF50;
    font-weight: 600;
}

/* Sync Status */
.mango-sync-status {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.mango-sync-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
}

.mango-sync-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mango-sync-icon {
    font-size: 1rem;
    margin-right: 8px;
}

.mango-sync-text {
    flex: 1;
    opacity: 0.8;
}

.mango-sync-value {
    font-weight: 600;
    color: #4CAF50;
}

/* Device Info */
.mango-device-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.mango-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}

.mango-info-label {
    opacity: 0.7;
}

.mango-info-value {
    font-weight: 500;
}

.mango-connected {
    color: #4CAF50;
}

.mango-synced {
    color: #2196F3;
}

/* Device Footer */
.mango-device-footer {
    padding: 15px 0;
    background: #000;
    display: flex;
    justify-content: center;
}

.mango-home-indicator {
    width: 120px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Video Panel (Right Side) */
.mango-video-panel {
    flex: 0.75;
    position: relative;
    overflow: hidden;
    background: #000;
}

.mango-popup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mango-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    display: none;
}

.mango-video-header {
    text-align: center;
    margin-bottom: 30px;
}

.mango-video-header h3 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff, #a0c8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mango-video-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Video Controls */
.mango-video-controls {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mango-video-timer {
    margin-bottom: 20px;
}

.mango-timer-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mango-timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.mango-timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.2rem;
}

.mango-timer-label {
    opacity: 0.8;
}

.mango-timer-value {
    font-weight: 600;
    color: #4CAF50;
}

.mango-timer-separator {
    opacity: 0.5;
}

.mango-timer-total {
    opacity: 0.7;
}

.mango-video-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mango-video-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mango-video-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mango-video-info {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.mango-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

.mango-info-icon {
    font-size: 1.2rem;
}

.mango-info-text {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mango-lightbox-container {
        height: 95vh;
    }
    
    .mango-mobile-device {
        max-width: 300px;
    }
    
    .mango-position-value {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .mango-lightbox-content {
        flex-direction: column;
    }
    
    .mango-mobile-panel {
        flex: none;
        height: 50vh;
        min-height: 500px;
        padding: 20px;
    }
    
    .mango-video-panel {
        flex: none;
        height: 40vh;
        min-height: 300px;
    }
    
    .mango-mobile-device {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .mango-control-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mango-hero-title {
        font-size: 2.2rem;
    }
    
    .mango-hero-subtitle {
        font-size: 1rem;
    }
    
    .mango-lightbox-container {
        width: 98%;
        height: 98vh;
        border-radius: 15px;
    }
    
    .mango-mobile-device {
        max-width: 300px;
    }
    
    .mango-position-value {
        font-size: 2.5rem;
    }
    
    .mango-video-overlay {
        padding: 20px;
    }
    
    .mango-video-header h3 {
        font-size: 1.8rem;
    }
    
    .mango-video-header p {
        font-size: 1rem;
    }
    
    .mango-window-frame {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .mango-hero-section {
        padding: 20px;
    }
    
    .mango-hero-title {
        font-size: 1.8rem;
    }
    
    .mango-hero-subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .mango-dive-btn {
        padding: 6px 24px;
        font-size: 1rem;
    }
    
    .mango-lightbox-container {
        border-radius: 10px;
    }
    
    .mango-mobile-panel {
        height: 55vh;
        min-height: 450px;
        padding: 15px;
    }
    
    .mango-video-panel {
        height: 35vh;
        min-height: 250px;
    }
    
    .mango-mobile-device {
        max-width: 280px;
        border-radius: 35px;
        padding: 12px;
        border-width: 6px;
    }
    
    .mango-device-screen {
        padding: 15px;
    }
    
    .mango-position-value {
        font-size: 2.2rem;
    }
    
    .mango-control-buttons {
        grid-template-columns: 1fr;
    }
    
    .mango-window-frame {
        height: 130px;
    }
    
    .mango-close-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }
    
    .mango-video-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .mango-video-info {
        flex-direction: column;
        gap: 10px;
    }
    .mango-hero-section {
      position: relative;
      width: 100%;
      height: 45vh;
      background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)), url('../app/living.jpg');
        background-position-x: 0%, 0%;
        background-position-y: 0%, 0%;
        background-size: auto, auto;
      background-size: cover;
      background-position: center;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 20px;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .mango-hero-section {
        height: auto;
        min-height: 100vh;
        padding: 40px 20px;
    }
    
    .mango-lightbox-container {
        height: 98vh;
    }
    
    .mango-mobile-panel {
        height: 50vh;
        min-height: auto;
    }
    
    .mango-video-panel {
        height: 50vh;
        min-height: auto;
    }
    
    .mango-mobile-device {
        max-width: 280px;
    }
    
    .mango-device-screen {
        padding: 15px;
        overflow-y: auto;
    }
    
    .mango-window-frame {
        height: 100px;
    }
    .mango-hero-section {
      position: relative;
      width: 100%;
      height: 45vh;
      background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)), url('../app/living.jpg');
        background-position-x: 0%, 0%;
        background-position-y: 0%, 0%;
        background-size: auto, auto;
      background-size: cover;
      background-position: center;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 20px;
    }
}

@media (max-width: 360px) {
    .mango-mobile-device {
        max-width: 260px;
    }
    
    .mango-hero-title {
        font-size: 1.6rem;
    }
    
    .mango-position-value {
        font-size: 2rem;
    }
    
    .mango-window-frame {
        height: 110px;
    }
    .mango-hero-section {
      position: relative;
      width: 100%;
      height: 45vh;
      background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)), url('../app/living.jpg');
        background-position-x: 0%, 0%;
        background-position-y: 0%, 0%;
        background-size: auto, auto;
      background-size: cover;
      background-position: center;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 20px;
    }
}

/* Animation for sync indicator */
@keyframes syncPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.mango-syncing {
    animation: syncPulse 2s infinite;
}