/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #eee;
    line-height: 1.6;
}
a {
    text-decoration: none; /* Remove underlines from all links */
    color: #4fc3f7;
}

/* Header Styles */
.dg-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.dg-logo {
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
}
a {
    text-decoration: none; /* Remove underlines from all links */
    color: inherit;
    display: block;
}

.dg-game-item a {
    color: #eee;
}

.dg-header-extra {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.dg-cat-toggle {
    background: #ff7043;
    color: #fff;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 15px;
    transition: background 0.3s;
}
.dg-cat-toggle:hover {
    background: #f4511e;
}
.dg-search {
    display: flex;
    align-items: center;
}
.dg-search-icon {
    font-size: 1.2em;
    margin-right: 8px;
}
.dg-search input[type="text"] {
    padding: 8px 12px;
    border: none;
    border-radius: 5px 0 0 5px;
}
.dg-search button {
    padding: 8px 12px;
    border: none;
    background: #ff7043;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.dg-search button:hover {
    background: #f4511e;
}
.dg-sidebar-toggle {
    background: transparent;
    border: none;
    font-size: 1.8em;
    color: #fff;
    cursor: pointer;
    margin-right: 15px;
}

/* Main Page Styles */
.dg-main {
    padding: 30px 20px;
    animation: fadeIn 1s ease-in-out;
}
.dg-intro {
    text-align: center;
    margin-bottom: 40px;
}
.dg-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    animation: slideDown 1s ease-out;
}
.dg-site-desc {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.dg-games {
    margin-bottom: 40px;
}
.dg-games h2 {
    text-align: center;
    margin-bottom: 20px;
}
.dg-game-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.dg-game-item {
    background: #1e2a38;
    border-radius: 10px;
    overflow: hidden;
    width: 200px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: popIn 0.8s ease forwards;
    opacity: 0;
}
.dg-game-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}
.dg-game-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.dg-game-item span {
    display: block;
    padding: 10px;
    text-align: center;
}

/* Sidebar (Categories & Detail Page) */
.dg-sidebar {
    width: 300px;
    background: rgba(0,0,0,0.6);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.5s ease;
    position: fixed;
    top: 0;
    bottom: 0;
    right: -320px;
    z-index: 1000;
    overflow-y: auto;
}
.dg-sidebar.active {
    transform: translateX(-320px);
}
.dg-sidebar h3 {
    text-align: center;
    margin-bottom: 15px;
}
.dg-sidebar-list {
    list-style: none;
    margin-bottom: 20px;
}
.dg-sidebar-list li {
    margin: 10px 0;
    text-align: center;
}
.dg-sidebar-search {
    display: flex;
    align-items: center;
    justify-content: center;
}
.dg-sidebar-search .dg-search-icon {
    margin-right: 8px;
}
.dg-sidebar-search input[type="text"] {
    padding: 8px 10px;
    border: none;
    border-radius: 5px 0 0 5px;
}
.dg-sidebar-search button {
    padding: 8px 10px;
    border: none;
    background: #ff7043;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.dg-sidebar-search button:hover {
    background: #f4511e;
}
/* Close Button for Category Sidebar */
.dg-close-btn {
    background: #f4511e;
    color: #fff;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    transition: background 0.3s;
}
.dg-close-btn:hover {
    background: #d84315;
}

/* Detail Page Container */
.dg-container {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    animation: fadeIn 1s ease-in-out;
}
.dg-detail {
    flex: 1 1 65%;
    padding: 20px;
}
.dg-detail h2 {
    margin-bottom: 20px;
    animation: slideDown 1s ease-out;
}
.dg-detail img {
    width: 100%;
    border-radius: 10px;
    margin: 20px 0;
    transition: transform 0.3s;
}
.dg-detail img:hover {
    transform: scale(1.05);
}
.dg-detail p {
    margin-bottom: 20px;
    background: rgba(0,0,0,0.4);
    padding: 15px;
    border-radius: 8px;
}
.dg-play-btn {
    background: #66bb6a;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 30px;
}
.dg-play-btn:hover {
    background: #43a047;
}
.dg-related {
    margin-top: 30px;
}
.dg-related h3 {
    text-align: center;
    margin-bottom: 20px;
}
.dg-related-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.dg-related-item {
    background: #1e2a38;
    border-radius: 10px;
    overflow: hidden;
    width: 180px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: popIn 0.8s ease forwards;
    opacity: 0;
}
.dg-related-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}
.dg-related-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.dg-related-item span {
    display: block;
    padding: 8px;
    text-align: center;
}

/* Footer Styles */
.dg-footer {
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
}
.dg-footer a {
    margin: 0 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dg-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dg-header-extra {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .dg-logo {
        text-align: center;
        width: 100%;
    }
    .dg-main {
        padding: 20px 10px;
    }
    .dg-game-items {
        flex-direction: column;
        align-items: center;
    }
    .dg-game-item {
        width: 90%;
        max-width: 300px;
    }
    .dg-container {
        flex-direction: column;
        padding: 10px;
    }
    .dg-detail {
        flex: 1 1 100%;
        padding: 10px;
    }
}

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
