/* ============================================
   SIDEBAR TOGGLE - Enhanced Styles
   ============================================ */

.sidebar {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    transform: translateX(100%);
}

/* Toggle Button - Modern Design */
.sidebar-toggle-btn {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #5aa9ff 0%, #3a86ff 100%);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 51;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    box-shadow:
        0 4px 15px rgba(90, 169, 255, 0.4),
        0 0 0 0 rgba(90, 169, 255, 0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle-btn:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow:
        0 8px 25px rgba(90, 169, 255, 0.5),
        0 0 0 4px rgba(90, 169, 255, 0.15);
}

.sidebar-toggle-btn:active {
    transform: scale(1);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

.sidebar-toggle-btn:hover i {
    transform: scale(1.1);
}

.sidebar-toggle-btn.hidden {
    display: none;
}

/* Sidebar Content */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Main wrapper transitions */
.main-wrapper {
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper.full-width {
    margin-right: 0;
}

/* ============================================
   PHONE PREVIEW - Premium Design (iPhone Style)
   ============================================ */

.phone-preview-container {
    position: sticky !important;
    top: 90px !important;
    width: 320px !important;
    height: 640px !important;
    background: #000 !important;
    /* Deep black frame */
    border-radius: 54px !important;
    padding: 10px !important;
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.5),
        0 20px 50px -10px rgba(0, 0, 0, 0.3),
        inset 0 0 2px 1px rgba(255, 255, 255, 0.2) !important;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 5px solid #1a1a1a !important;
    /* Metallic bezel */
    z-index: 40;
}

.phone-preview-container:hover {
    transform: translateY(-8px) scale(1.02) rotateY(-2deg) rotateX(1deg);
    box-shadow:
        15px 50px 110px -20px rgba(0, 0, 0, 0.4),
        0 20px 50px -10px rgba(0, 0, 0, 0.2),
        inset 0 0 3px 2px rgba(255, 255, 255, 0.3) !important;
}

/* Dynamic Island */
.phone-preview-container::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 24px;
    background: #000;
    border-radius: 20px;
    z-index: 50;
    transition: width 0.3s ease;
}

.phone-preview-container:hover::before {
    width: 110px;
    /* Expands slightly on hover for "active" look */
}

/* Speaker/Sensors in Dynamic Island */
.phone-preview-container::after {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(50% + 20px);
    width: 6px;
    height: 6px;
    background: #1a1a2e;
    border-radius: 50%;
    z-index: 51;
    box-shadow:
        inset 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 2px rgba(255, 255, 255, 0.1);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 46px !important;
    overflow: hidden;
    background: #fff;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Glossy glass effect overlay */
.phone-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: 10;
}

/* Side Buttons - Modern Material Feel */
#phone-preview-wrapper {
    position: relative;
}

/* Silent Switch & Volume */
.phone-preview-container-btns-left {
    position: absolute;
    left: -12px;
    top: 100px;
    width: 4px;
    height: 120px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: -1;
}

.left-btn-sm {
    width: 4px;
    height: 26px;
    background: #222;
    border-radius: 4px 0 0 4px;
}

.left-btn-lg {
    width: 4px;
    height: 50px;
    background: #222;
    border-radius: 4px 0 0 4px;
}

/* Power Button */
.phone-preview-container-btns-right {
    position: absolute;
    right: -12px;
    top: 150px;
    width: 4px;
    height: 80px;
    background: #222;
    border-radius: 0 4px 4px 0;
    z-index: -1;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1280px) {
    .phone-preview-container {
        width: 280px !important;
        height: 560px !important;
        border-radius: 36px !important;
    }
}

@media (max-width: 1024px) {
    .phone-preview-container {
        display: none !important;
    }

    #phone-preview-wrapper {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle-btn {
        right: 15px;
        top: 15px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}