
/* Anatomy Learning Screen Styles */
#gpanel-anatomy_learning {
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch;
}

.ganatomy-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
    background: #0f172a;
    color: #f8fafc;
    margin: -20px -20px 0 -20px;
    padding: 20px;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 100px;
}

.ganatomy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.ganatomy-header h1 {
    color: #38bdf8;
    margin: 0;
    font-size: 24px;
}

.ganatomy-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.gtab-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.gtab-btn:hover {
    background: #1e293b;
    color: #f8fafc;
}

.gtab-btn.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-color: #38bdf8;
}

/* Sections */
.gsection {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.gsection.active {
    display: block;
}

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

/* 3D Model Section */
.g3d-container {
    display: flex;
    gap: 20px;
    height: 85vh; /* Increased from 70vh */
    min-height: 750px;
}

.g3d-viewer {
    flex: 3; /* Give the viewer more space than sidebar */
    background: #050b14; /* Deep medical background */
    border-radius: 12px;
    border: 2px solid #334155;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.g3d-sidebar {
    flex: 1;
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    overflow-y: auto;
}

/* Flashcards Section */
.gflashcard-container {
    max-width: 600px;
    margin: 40px auto;
    perspective: 1000px;
}

.gcard {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.gcard img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.gcard h3 {
    color: #f8fafc;
    font-size: 22px;
    margin-bottom: 5px;
}

.gcard p {
    color: #94a3b8;
    margin-bottom: 20px;
    direction: ltr;
}

.goptions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.gopt-btn {
    background: #334155;
    color: #f8fafc;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: background 0.2s;
}

.gopt-btn:hover {
    background: #475569;
}

.gopt-btn.correct {
    background: #10b981 !important;
    color: #fff;
}

.gopt-btn.wrong {
    background: #ef4444 !important;
    color: #fff;
}

/* Joints Section */
.gjoints-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
}

.gjoints-list {
    background: #1e293b;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #334155;
}

.gjoint-item {
    padding: 12px 15px;
    background: #0f172a;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.gjoint-item:hover, .gjoint-item.active {
    background: #334155;
    border-color: #38bdf8;
    color: #38bdf8;
}

.gjoint-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    min-height: 500px;
}

.gmovement-card {
    background: #0f172a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #334155;
}

.gmovement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.gmovement-header h3 {
    margin: 0;
    color: #f43f5e;
}

.gmovement-body {
    display: flex;
    gap: 20px;
}

.gmovement-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
}

.gmovement-info {
    flex: 1;
}

.gmuscle-tag {
    display: inline-block;
    background: #334155;
    color: #38bdf8;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.gmuscle-tag:hover {
    background: #38bdf8;
    color: #fff;
}

/* Modal */
.gmodal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    display: none;
}

.gmodal-content {
    background: #1e293b;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #334155;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.gmodal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: #ef4444;
    color: #fff;
    border: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.gmodal-img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
}

.ginfo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.ginfo-box {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.ginfo-box h4 {
    margin: 0 0 10px 0;
    color: #a78bfa;
}

.video-input-container {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}
.video-input-container input {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
}
.video-input-container button {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}

/* Responsive Styles for iPad & Mobile */
@media (max-width: 992px) {
    .g3d-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .g3d-viewer {
        height: 60vh;
        min-height: 400px;
    }
    .g3d-sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
    }
    .gjoints-grid {
        grid-template-columns: 1fr;
    }
    .ginfo-grid {
        grid-template-columns: 1fr;
    }
    .gmovement-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .gmovement-img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .ganatomy-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .ganatomy-tabs {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    .gtab-btn {
        flex: 1 1 auto;
        padding: 8px;
        font-size: 14px;
        text-align: center;
    }
}
