* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    width: 100% !important;
    max-width: 900px !important;
    padding: 20px;
}

.auth-box, .game-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: none;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #764ba2;
    margin-bottom: 20px;
    text-align: center;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

p {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

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

.error {
    background: #ffebee;
    color: #c62828;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
}

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

.header h1 {
    margin-bottom: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#username-display {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
}

.logout-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 12px;
    margin: 0;
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: 0 0 20px 0;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    line-height: 1.6;
}

.roll-section {
    text-align: center;
    margin: 30px 0;
}

.roll-button {
    width: auto;
    padding: 20px 60px;
    font-size: 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cooldown {
    margin-top: 15px;
    font-size: 18px;
    color: #764ba2;
    font-weight: bold;
    min-height: 25px;
}

.auto-roll-container {
    margin-top: 20px;
}

.auto-roll-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    color: #667eea;
    font-weight: bold;
}

.auto-roll-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.last-roll {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
}

.inventory-section {
    margin-top: 30px;
}

.inventory-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8em;
}

#inventory-list {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.inventory-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.inventory-item:hover {
    transform: translateX(5px);
}

.rarity-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.count-badge {
    background: #4caf50;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
}

.empty-inventory {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

/* Scrollbar styling */
#inventory-list::-webkit-scrollbar {
    width: 8px;
}

#inventory-list::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

#inventory-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

#inventory-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
