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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
}

body.modal-open {
    overflow: hidden;
}

header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.game-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-thumbnail {
    background: rgba(255, 255, 255, 0.1);
    height: 180px;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

.game-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    z-index: 1;
}

.game-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-icon {
    font-size: 4rem;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.game-card p {
    color: rgba(255, 255, 255, 0.8);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-actions button {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.card-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #ff6b6b;
}

.modal-content h2 {
    margin-bottom: 25px;
    font-size: 2rem;
}

.setting-group {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

.setting-group input {
    width: calc(100% - 100px);
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    margin-right: 10px;
}

.setting-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.setting-group button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.setting-group button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.icon-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.icon-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.icon-btn img {
    width: 24px;
    height: 24px;
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 107, 107, 0.5);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: 0.3s;
}

.reset-btn:hover {
    background: rgba(255, 107, 107, 0.5);
}

/* Game Page Styles */
.game-page {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
}

.home-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: 0.3s;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.game-list {
    list-style: none;
}

.game-list li {
    margin-bottom: 10px;
}

.game-list a {
    display: block;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.game-list a:hover,
.game-list a.active {
    background: rgba(255, 255, 255, 0.3);
}

.game-container {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
}

.game-header {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.game-header h2 {
    font-size: 2rem;
}

.game-header > div {
    display: flex;
    gap: 10px;
}

.fullscreen-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.game-frame {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100%;
}

.game-frame iframe {
    border-radius: 5px;
    width: 100% !important;
    height: calc(100vh - 200px) !important;
    min-height: 600px;
    max-width: 100%;
}

.game-frame.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    padding: 0;
    border-radius: 0;
    background: #000;
}

.game-frame.fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}

@media (max-width: 768px) {
    .game-page {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* Proxies Section */
.proxies-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.proxies-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.proxy-note {
    text-align: center;
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 40px;
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.proxy-category {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.proxy-category h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommended {
    font-size: 0.9rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    border: 2px solid rgba(74, 222, 128, 0.3);
}

.proxy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.proxy-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.proxy-btn {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
}

.proxy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.proxy-frame {
    width: 100%;
    height: 400px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.proxy-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .proxy-grid {
        grid-template-columns: 1fr;
    }
    
    .proxies-section h2 {
        font-size: 1.8rem;
    }
    
    .proxy-category h3 {
        font-size: 1.3rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    header {
        flex-direction: column;
        gap: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* Mirror Links Styles */
.mirror-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mirror-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.mirror-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mirror-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
}

.mirror-info {
    flex: 1;
}

.mirror-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: #fff;
}

.mirror-info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #4ade80;
    word-break: break-all;
}

.copy-btn {
    padding: 8px 16px;
    background: rgba(74, 222, 128, 0.2);
    border: 2px solid rgba(74, 222, 128, 0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: rgba(74, 222, 128, 0.4);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mirror-list {
        grid-template-columns: 1fr;
    }
    
    .mirror-card {
        flex-direction: column;
        text-align: center;
    }
    
    .mirror-icon {
        min-width: auto;
    }
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 34px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(74, 222, 128, 0.4);
    border-color: rgba(74, 222, 128, 0.6);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
