:root {
    --primary-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
    --secondary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --accent-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #333;
    --text-muted: #666;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

.logo-container {
    margin-bottom: 20px;
}

.game-logo {
    max-width: 200px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

h1 {
    font-weight: 700;
    margin-bottom: 30px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dice-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    min-height: 150px;
}

.dice {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.15), 
        inset 0 -8px 12px rgba(0,0,0,0.1), 
        inset 0 8px 12px rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.2);
    word-break: break-word;
    padding: 15px;
    overflow: hidden;
    position: relative;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dice:nth-child(4n+1) { background: linear-gradient(135deg, #6366f1, #a855f7); }
.dice:nth-child(4n+2) { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.dice:nth-child(4n+3) { background: linear-gradient(135deg, #10b981, #3b82f6); }
.dice:nth-child(4n+4) { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.dice:hover {
    transform: translateY(-12px) rotate(8deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.dice::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.dice-face {
    display: grid;
    grid-template-areas:
        "a . b"
        "c d e"
        "f . g";
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 15px;
    gap: 5px;
}

.pip {
    display: block;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Pip positions */
.pip-a { grid-area: a; }
.pip-b { grid-area: b; }
.pip-c { grid-area: c; }
.pip-d { grid-area: d; }
.pip-e { grid-area: e; }
.pip-f { grid-area: f; }
.pip-g { grid-area: g; }

.dice.rolling {
    animation: bounceRoll 0.6s infinite;
}

@keyframes bounceRoll {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(10deg); }
    50% { transform: scale(0.9) rotate(-10deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

.controls {
    margin-bottom: 40px;
}

.btn-custom {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    margin: 5px;
}

.btn-roll {
    background: var(--primary-gradient);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(110, 142, 251, 0.4);
}

.btn-roll:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(110, 142, 251, 0.6);
}

.btn-config {
    background: white;
    color: #555;
    border: 1px solid #ddd;
}

.btn-config:hover {
    background: #f0f0f0;
}

.settings-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 40px;
    text-align: left;
}

.dice-config-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
}

.remove-dice {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ff4d4d;
    cursor: pointer;
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.option-tag {
    background: #eef2ff;
    color: #4338ca;
    padding: 5px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.option-tag i {
    cursor: pointer;
    font-size: 0.8rem;
}

.input-group-custom {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 2px 5px 2px 15px;
    transition: border-color 0.3s;
}

.input-group-custom:focus-within {
    border-color: #6e8efb;
}

.add-option-input {
    border: none;
    padding: 5px 0;
    outline: none;
    font-size: 0.9rem;
    width: 180px;
}

.add-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.2s;
}

.add-btn:hover {
    transform: scale(1.1);
}

.game-info {
    text-align: left;
    margin-top: 60px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.game-info h2 {
    color: #4338ca;
    margin-bottom: 20px;
}

.game-info h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

.game-info p {
    color: #555;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .dice {
        width: 80px;
        height: 80px;
        font-size: 1rem;
    }
}

/* Fix for floating navigation menu z-index */
.floating-nav {
    z-index: 1000 !important;
}

.nav-toggle {
    z-index: 1001 !important;
}

body {
    min-height: 100vh;
}
