 :root {
    --primary-color: #007bff;
    --primary-light: #6aa8e2;
    --secondary-color: #f0f2f5;
    --text-color: #343a40;
    --light-grey-border: #e9ecef;
    --dark-grey-text: #6c757d;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.15);
    --gradient-start: #6a11cb;
    --gradient-end: #2575fc;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--light-grey-border); border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--light-grey-border);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* Body Layout */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Container */
.tab-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background-color: var(--white);
    box-shadow: 0 20px 50px var(--shadow);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--light-grey-border);
}

/* Tabs Header */
.tab-buttons {
    display: flex;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--light-grey-border);
    flex-shrink: 0;
    padding: 0 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-buttons::-webkit-scrollbar { display: none; }

.tab-button {
    flex-grow: 1;
    padding: 18px 25px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-grey-text);
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    user-select: none;
    border-radius: 8px 8px 0 0;
    margin: 0 2px;
    white-space: nowrap;
}
.tab-button:hover:not(.active) {
    background-color: var(--light-grey-border);
    color: var(--text-color);
    transform: translateY(-2px);
}
.tab-button.active {
    color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 -3px 0 0 var(--primary-color) inset;
    z-index: 2;
}

/* Tab Content */
.tab-content-wrapper {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}
.tab-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-color: var(--white);
    overflow: auto;
}
.tab-content.active {
    display: block;
    opacity: 1;
}
.tab-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 15px 15px;
}

/* Responsive for Tablets and Small Laptops */
@media (max-width: 992px) {
    .tab-container {
        width: 98%;
        height: 95vh;
    }
    .tab-button {
        flex-basis: auto;
        padding: 14px 18px;
        font-size: 0.9rem;
    }
}

/* Responsive for Phones */
@media (max-width: 576px) {
    body {
        overflow: auto;
        align-items: flex-start;
    }
    .tab-container {
        height: auto;
        min-height: 90vh;
        border-radius: 10px;
    }
    .tab-buttons {
        padding: 5px;
        overflow-x: auto;
    }
    .tab-button {
        flex: 1 0 auto;
        font-size: 0.85rem;
        padding: 12px 15px;
    }
    .tab-content iframe {
        border-radius: 0;
    }
}

/* Extra Small Devices (max-width: 400px) */
@media (max-width: 400px) {
    .tab-container {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    .tab-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 4px;
        gap: 3px;
    }
    .tab-button {
        flex: 0 0 auto;
        font-size: 0.8rem;
        padding: 10px 12px;
        margin: 1px;
    }
    .tab-content iframe {
        height: 85vh;
    }
}
