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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login Screen */
.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-container h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
    text-align: center;
    font-style: italic;
    color: #a8a8a8;
    margin-bottom: 30px;
}

.form-container h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #4ecdc4;
}

.form-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
}

.form-container input::placeholder {
    color: #aaa;
}

.form-container button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.form-container button:hover {
    transform: scale(1.02);
}

.switch-form {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.switch-form a {
    color: #4ecdc4;
    text-decoration: none;
}

.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.message.error {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.message.success {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
}

/* Channel Screen */
.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.container h1 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.welcome {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #4ecdc4;
}

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

.channel-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.15);
}

.channel-card h3 {
    color: #4ecdc4;
    margin-bottom: 10px;
}

.channel-info {
    font-size: 14px;
    color: #ccc;
    margin: 5px 0;
}

#join-channel-form {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#join-channel-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#join-channel-form button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background: #4ecdc4;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn {
    display: block;
    margin: 30px auto 0;
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    background: #ff6b6b;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* Game Screen */
.game-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.game-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-header h1 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #4ecdc4;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    min-height: 400px;
}

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

.tab-content h2 {
    color: #4ecdc4;
    margin-bottom: 10px;
}

.tab-content p {
    color: #aaa;
    margin-bottom: 20px;
}

/* Service Options */
.service-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.service-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: #4ecdc4;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

.service-card h3 {
    color: #4ecdc4;
    margin-bottom: 15px;
}

.service-card .price {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin: 10px 0;
}

.service-card .profit {
    color: #a8e6cf;
    margin: 5px 0;
}

.service-card .desc {
    color: #aaa;
    font-size: 14px;
    margin-top: 10px;
}

/* Purchase Options */
.purchase-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.purchase-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.purchase-item:hover {
    transform: translateY(-3px);
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.1);
}

.purchase-item h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
    font-size: 18px;
}

.purchase-item .cost {
    color: #ffd93d;
    font-weight: bold;
    margin: 10px 0;
}

.purchase-item p {
    color: #aaa;
    font-size: 14px;
}

.purchase-item input {
    width: 60px;
    padding: 5px;
    margin: 10px 5px;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
}

.purchase-item button {
    padding: 8px 20px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    background: #4ecdc4;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* Items Lists */
.items-grid, .items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.item-card {
    background: rgba(78, 205, 196, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
}

.item-card h4 {
    color: #4ecdc4;
    margin-bottom: 5px;
}

.item-card p {
    color: #aaa;
    font-size: 14px;
    margin: 3px 0;
}

/* History */
#funeral-history {
    max-height: 600px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
}

.history-item h4 {
    color: #4ecdc4;
    margin-bottom: 5px;
}

.history-item p {
    color: #ccc;
    font-size: 14px;
    margin: 3px 0;
}

/* Leaderboard */
#leaderboard-content {
    max-height: 600px;
    overflow-y: auto;
}

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

.leaderboard-item.rank-1 {
    border-left: 4px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.leaderboard-item.rank-2 {
    border-left: 4px solid #c0c0c0;
}

.leaderboard-item.rank-3 {
    border-left: 4px solid #cd7f32;
}

.leaderboard-rank {
    font-size: 24px;
    font-weight: bold;
    color: #4ecdc4;
    margin-right: 15px;
}

.leaderboard-info h4 {
    color: #4ecdc4;
    margin-bottom: 5px;
}

.leaderboard-stats {
    text-align: right;
}

.leaderboard-stats p {
    color: #aaa;
    font-size: 14px;
}

/* Messages */
#messages-content {
    max-height: 600px;
    overflow-y: auto;
}

.message-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
    cursor: pointer;
    transition: all 0.3s;
}

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

.message-item.unread {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.message-item h4 {
    color: #4ecdc4;
    margin-bottom: 5px;
}

.message-item .message-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 5px;
}

.message-type.system {
    background: rgba(102, 126, 234, 0.3);
}

.message-type.event {
    background: rgba(78, 205, 196, 0.3);
}

.message-type.news {
    background: rgba(255, 215, 0, 0.3);
}

/* Footer */
.game-footer {
    margin-top: 20px;
    text-align: center;
}

.game-footer button {
    padding: 12px 25px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.game-footer button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-bar {
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .service-options, .purchase-options {
        grid-template-columns: 1fr;
    }
}
