* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('../img/5.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.home-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #000;
    background-color: #c1d671;
    color: #181b22;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 100;
}

.home-button:hover {
    transform: scale(1.1);
    background-color: #b5c965;
}

.home-button svg {
    width: 24px;
    height: 24px;
}

.learning-container {
    display: flex;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
}

.left-side {
    flex: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-img {
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    transition: transform 0.2s;
}

.home-img:hover {
    transform: scale(1.05);
}

.home-modal-img {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 10px;
}

.right-side {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px 16px 0 0;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.tab-btn {
    flex: 1;
    font-family: 'DM Sans', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    background-color: transparent;
    color: #181b22;
    border: none;
    border-bottom: 4px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    bottom: -1px;
}

.tab-btn:hover {
    background-color: rgba(193, 214, 113, 0.3);
}

.tab-btn.active {
    background-color: rgba(255, 255, 255, 0.95);
    color: #e48449;
}

.tab-content {
    display: none;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 0 0 16px 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.item-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
}

.item-list li {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1rem;
    background-color: #fff;
    color: #181b22;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-list li:hover {
    transform: translateY(-3px);
    background-color: #c1d671;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.image-modal {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: transparent;
    padding: 0;
    border: none;
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* iPad Responsive */
@media screen and (max-width: 1024px) {
    body {
        padding: 1rem;
    }
    
    .learning-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .left-side {
        flex: none;
    }
    
    .home-img {
        max-height: 40vh;
    }
    
    .right-side {
        flex: none;
    }
    
    .tab-btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .item-list li {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}
