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

body{
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6fa;
    overflow-x: hidden;
    overflow-y: auto;
}
.app-wrapper{
    height: 100vh;
    display: flex;
    overflow: hidden;
}
.sidebar{
    width: 280px;
    min-width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;

    display: flex;
    flex-direction: column;

    z-index: 1000;
}

.sidebar-header{
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h6{
    font-size: 15px;
    font-weight: 600;
}

.sidebar-header small{
    font-size: 12px;
}

.sidebar-link{
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;
    margin: 6px 12px;

    border-radius: 14px;

    text-decoration: none;
    color: #374151;

    transition: .2s;
}

.logout-link{
    display: flex;
    align-items: center;
    gap: 8px;

    text-decoration: none;
    color: #ef4444;

    font-weight: 600;
    font-size: 15px;
}

.logout-link:hover{
    color: #dc2626;
}

.sidebar-link:hover{
    background: #eef4ff;
    color: #2563eb;
    transform: translateX(2px);
}

.sidebar-link.active{
    background: #dbeafe;
    color: #2563eb;
}
.main-area{
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.top-header{
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;
}

.ticker{
    background: #111827;
    color: #fff;
    padding: 8px 12px;

    overflow: hidden;
    white-space: nowrap;
}

.ticker-text{
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker{
    0%{ transform: translateX(100%); }
    100%{ transform: translateX(-100%); }
}
main{
    flex: 1;
    overflow: hidden;
    padding: 5px;
    background: #f5f6fa;
}
.canvas-wrapper{
    width: 100%;
    height: 100%;
    background: #111827;

    border-radius: 18px;

    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas container */
#canvasWrapper{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Canvas */

.toolbar button{
    background: #374151;
    color: #fff;

    border: none;

    padding: 10px 14px;
    border-radius: 10px;

    cursor: pointer;
    transition: .2s;
}

.toolbar button:hover{
    background: #2563eb;
}
.info{
    color: #fff;
    background: #111827;

    padding: 8px 12px;
    border-radius: 10px;
}



.zoom-control{
    position: absolute;
    left: 15px;
    top: 48%;
    transform: translateY(-50%);

    display: flex;
    flex-direction: column;

    gap: 10px;

    background: #ffffff;


    border-radius: 16px;

    z-index: 50;

    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.zoom-control button{
    width: 42px;
    height: 42px;

    border-radius: 12px;

    border: none;

    background: #f3f4f6;

    font-size: 18px;

    cursor: pointer;
}

.zoom-control button:hover{
    background: #e5e7eb;
}

/* ===================================
   BUY MODAL (BOTTOM SHEET)
=================================== */

.buy-modal{
    position: absolute;
    bottom: -500px;
    left: 50%;
    transform: translateX(-50%);

    width: 90%;
    max-width: 700px;

    background: #fff;

    border-radius: 20px 20px 0 0;

    padding: 20px;

    transition: .3s ease;

    z-index: 200;
}

.buy-modal.active{
    bottom: 0;
}

/* ===================================
   MOBILE RESPONSIVE
=================================== */

@media (max-width:768px){

    .sidebar{
        position: fixed;
        left: -280px;
        top: 0;

        transition: .3s;
    }

    .sidebar.active{
        left: 0;
    }

    main{
        padding: 5px;
    }

    .canvas-wrapper{
        height: 100%;
    }

    /* zoom يتحول أفقي في الموبايل */
    .zoom-control{
        left: 10px;
        top: auto;
        bottom: 5px;

        transform: none;

        flex-direction: row;
    }

    .toolbar{
        width: 95%;
        flex-wrap: wrap;
        bottom: 10px;
    }

    .buy-modal{
        width: 95%;
    }
}


.sidebar{
    width: 280px;
    min-width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-header{
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h6{
    font-size: 15px;
    font-weight: 600;
}










.btn-primary{
    background: #2563eb;
    border: none;
}

.btn-primary:hover{
    background: #1d4ed8;
}

.btn-outline-primary{
    border-color: #2563eb;
    color: #2563eb;
}

.btn-outline-primary:hover{
    background: #2563eb;
    color: #fff;
}

/* =========================
   Ticker Bar
========================= */

.ticker{
    background: #111827;
    color: #ffffff;
    padding: 8px 12px;

    overflow: hidden;
    white-space: nowrap;
}

.ticker-text{
    display: inline-block;
    animation: ticker 30s linear infinite;
    font-size: 14px;
}

@keyframes ticker{
    0%{
        transform: translateX(100%);
    }
    100%{
        transform: translateX(-100%);
    }
}

/* =========================
   Main Content
========================= */

main{
    flex: 1;
    overflow: auto;
    padding: 0px;
    background: #f5f6fa;
}

/* =========================
   Scrollbar
========================= */

main::-webkit-scrollbar{
    width: 8px;
}

main::-webkit-scrollbar-thumb{
    background: #cbd5e1;
    border-radius: 10px;
}

main::-webkit-scrollbar-track{
    background: transparent;
}

/* =========================
   Utility
========================= */

.shadow-soft{
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rounded-xl{
    border-radius: 16px;
}


/* =====================
   Auth Pages
===================== */

.auth-wrapper{
    height: 100vh;
    background: #f5f6fa;
}

.auth-card{
    width: 420px;
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.auth-input{
    height: 48px;
    border-radius: 12px;
}

.divider{
    text-align: center;
    position: relative;
}

.divider span{
    background: #fff;
    padding: 0 10px;
    color: #999;
}

.divider:before{
    content:"";
    position:absolute;
    top:50%;
    left:0;
    width:100%;
    height:1px;
    background:#eee;
    z-index:-1;
}

/* OTP */
.otp-box{
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

/* Username status */
.username-status{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: green;
}

/* =========================
   Canvas Page
========================= */

.canvas-wrapper{
    width:100%;
    height:100%;
    background:#111827;
    border-radius:20px;
    overflow:hidden;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
}


/* Canvas Container */

#canvasWrapper{

    width:100%;

    height:100%;

    display:flex;

    justify-content:center;

    align-items:center;

    overflow:hidden;

}




/* Canvas */





/* Toolbar */

.toolbar{


    position:absolute;


    bottom:25px;


    left:50%;


    transform:translateX(-50%);



    background:#1f2937;


    padding:12px 18px;


    border-radius:18px;



    display:flex;


    align-items:center;


    gap:12px;



    z-index:100;



    box-shadow:
        0 15px 40px rgba(0,0,0,.3);



}




.toolbar button{


    background:#374151;


    color:#fff;


    border:none;



    padding:10px 16px;



    border-radius:12px;



    cursor:pointer;



    font-size:14px;



    transition:.2s;



}




.toolbar button:hover{


    background:#2563eb;


}




.toolbar input{


    background:white;


    padding:8px;


    border-radius:10px;


}




.info{


    color:white;


    background:#111827;


    padding:10px 14px;


    border-radius:12px;


    font-size:14px;


}
/* zoom */

.zoom-control{
    position:absolute;
    left:15px;
    top:50%;
    transform:translateY(-50%);

    background:white;
    border-radius:16px;
    padding:8px;

    display:flex;
    flex-direction:column;
    gap:6px;

    z-index:50;

    box-shadow:0 5px 20px rgba(0,0,0,.15);
}


.user_name{
    padding: 5px;
    color: #fff;
    border-radius: 50%;
    height: 50px;
    display: inline-block;
    width: 50px;
    text-align: center;
    padding-top: 11px;
    background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);
}


.zoom-control button:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.zoom-control input {
    width: 7px;
    height: 120px;
    appearance: slider-vertical;
    writing-mode: bt-lr;
    cursor: pointer;
     margin: auto;
}




/* modal */


.buy-modal{


    position:fixed;


    bottom:-400px;


    left:50%;


    transform:translateX(-50%);


    width:90%;

    max-width:600px;


    background:white;


    border-radius:35px 35px 0 0;


    padding:30px;


    z-index:100;



    transition:.3s ease;



    box-shadow:0 -10px 40px #0003;

    max-height: 80vh;

    overflow-y: auto;

}



.buy-modal.active{


    bottom:0;


}



.handle{


    width:50px;

    height:5px;

    background:#ddd;

    border-radius:10px;

    margin:0 auto 20px;

}



.modal-header{


    display:flex;

    justify-content:space-between;

    align-items: center;

    margin-bottom:20px;

    font-weight: 600;

    color: #1f2937;


}



.modal-header button{

    border:0;

    font-size:22px;

    background: none;

    cursor: pointer;

}



.buy-btn{


    width:100%;


    height:50px;


    background:#2563eb;


    color:white;


    border:0;


    border-radius:12px;


    font-size:16px;


    font-weight:bold;

    cursor: pointer;

    transition: all 0.3s;

    margin-top: 10px;

}

.buy-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* =========================
   MOBILE SIDEBAR
========================= */

.canvas-info {
    background: #000;
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    position: absolute;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    height: 150px;
    z-index: 999;
    bottom: 3px;
    flex-shrink: 0;
}












