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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.5;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 10px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    transition: width 0.3s ease;
    position: relative;
    z-index: 1000;
}

.sidebar:hover {
    width: 200px;
}

.sidebar-content {
    padding: 8px;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.sidebar:hover .sidebar-content {
    opacity: 1;
}

.logo {
    margin-bottom: 20px;
    text-align: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin: 0 auto;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-icon {
    font-size: 14px;
    min-width: 16px;
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 12px;
    height: 20px;
    background: #3b82f6;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle span {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 1px;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 8px;
}

.header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.profile-menu {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-btn:hover {
    background: #f1f5f9;
}

.profile-icon {
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
}

.chevron {
    font-size: 8px;
    color: #94a3b8;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 112px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 4px 8px;
    background: none;
    border: none;
    text-align: left;
    font-size: 10px;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.hidden {
    display: none;
}

/* Content */
.content {
    flex: 1;
    padding: 8px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.mission h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 16px;
}

.dynamic-menu {
    margin: 24px 0;
}

.games-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-content {
    padding: 16px;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}

.card p {
    color: #64748b;
    font-size: 14px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
    width: 95%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal input, .modal textarea, .modal select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.modal input:focus, .modal textarea:focus, .modal select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Tabs */
.tabs {
    width: 100%;
}

.tab-list {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.tab {
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Buttons */
.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Admin Panel Specific */
.content-item, .menu-item, .game-item, .product-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.menu-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1001;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        width: 200px;
    }
    
    .sidebar:hover {
        width: 10px;
    }
    
    .sidebar.open:hover {
        width: 200px;
    }
    
    .sidebar.open .sidebar-content {
        opacity: 1;
    }
    
    .main {
        margin-left: 0;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}