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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: white;
    padding-bottom: 250px;
    padding-top: 20px;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

body.panel-open {
    padding-left: 320px;
}

body.shop-panel-open {
    padding-left: 320px;
}

.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-container h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

.login-container input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.login-container input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.login-container button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.login-container button:active {
    transform: translateY(0);
}

.login-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    min-height: 20px;
}

.login-message.error {
    background: rgba(255, 0, 0, 0.2);
    color: #ffcccc;
}

.login-message.success {
    background: rgba(0, 255, 0, 0.2);
    color: #ccffcc;
}

.game-container {
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logout-button {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.toggle-mode {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.toggle-mode a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
    transition: opacity 0.2s ease;
}

.toggle-mode a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in;
}

.click-button {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    position: relative;
    overflow: hidden;
}

.click-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.click-button:active {
    transform: scale(0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.click-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s;
}

.click-button:active::before {
    width: 200px;
    height: 200px;
}

.stats {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.floating-number {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-container {
    position: relative;
    display: inline-block;
}

.console-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 230px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: bold;
    font-size: 0.9rem;
}

.clear-btn {
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.console-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.console-message {
    margin-bottom: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    border-left: 3px solid;
    word-wrap: break-word;
}

.console-message.request {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
    color: #90caf9;
}

.console-message.response {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
    color: #a5d6a7;
}

.console-message.error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #F44336;
    color: #ef9a9a;
}

.console-message.info {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #9e9e9e;
    color: #e0e0e0;
}

.console-timestamp {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-right: 8px;
}

.console-content::-webkit-scrollbar {
    width: 8px;
}

.console-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.console-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.console-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Shop Panel */
.shop-panel {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    overflow: hidden;
}

.shop-panel.open {
    left: 0;
}

.shop-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-panel-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.shop-tabs {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 500;
}

.shop-tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.shop-tab-btn.active {
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.3);
}

.seed-shop-btn {
    margin: 10px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #4CAF50 0%, #45a049 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seed-shop-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.shop-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shop-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.shop-item-name {
    font-weight: bold;
    font-size: 1rem;
}

.shop-item-price {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.95rem;
}

.shop-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.buy-item-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buy-item-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.buy-item-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.inventory-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.inventory-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.inventory-item-name {
    font-weight: bold;
    font-size: 1rem;
}

.inventory-item-quantity {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.inventory-item-details {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Users Panel */
.users-panel {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    overflow: hidden;
}

.users-panel.open {
    left: 0;
}

.users-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.users-panel-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.2s ease;
}

.close-panel-btn:hover {
    opacity: 0.7;
}

.search-container {
    position: relative;
    margin: 15px 20px;
    margin-bottom: 10px;
}

.user-search-input {
    width: 100%;
    padding: 10px 35px 10px 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.user-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: rgba(255, 255, 255, 1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin: 0 20px 15px 20px;
}

.filter-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-btn.active {
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.3);
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px;
}

.user-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.user-name {
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: bold;
}

.user-id {
    font-size: 0.8rem;
    opacity: 0.7;
}

.delete-user-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    background: rgba(244, 67, 54, 0.8);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.delete-user-btn:hover {
    background: rgba(244, 67, 54, 1);
}

.delete-user-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-panel-btn {
    position: fixed;
    left: 20px;
    top: 20px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s ease, left 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toggle-panel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-panel-btn.panel-open {
    left: 340px;
}

.toggle-panel-btn.shop-panel-open {
    left: 340px;
}

.shop-content::-webkit-scrollbar {
    width: 8px;
}

.shop-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.shop-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.shop-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Best Score Display */
.best-score-display {
    position: fixed;
    right: 20px;
    top: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    z-index: 999;
    text-align: center;
    min-width: 150px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.best-score-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.best-score-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.best-score-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    margin-bottom: 5px;
}

.best-score-player {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.9;
}

.users-list::-webkit-scrollbar {
    width: 8px;
}

.users-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.users-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.users-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.loading {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
}

.reset-section {
    margin-top: 30px;
    text-align: center;
}

.reset-button {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffd700 0%, #ffaa00 100%);
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

.reset-button:active {
    transform: translateY(0);
}

.reset-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(145deg, #666 0%, #444 100%);
    box-shadow: none;
}

.reset-info {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

