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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f1ea;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #2c1810;
    color: #f4f1ea;
    padding: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: #f4f1ea;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: block;
}

a {
    text-decoration: none;
    color: blue;
}

nav a:hover,
nav a.active {
    background-color: #4a2818;
}

main {
    padding: 1.5rem 0;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero h2 {
    font-size: 2.5rem;
    color: #2c1810;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

.content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sub-content {
    text-align: left;
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
}

.content h3,
.sub-content h3 {
    color: #2c1810;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.content h3:first-child,
.sub-content h3:first-child {
    margin-top: 0;
}

.content ul,
.sub-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content li,
.sub-content li {}

.dice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.dice-card {
    background-color: #f4f1ea;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #2c1810;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.dice-card[data-die="d4"]::before {
    background-image: url('images/d4.png');
}

.dice-card[data-die="d6"]::before {
    background-image: url('images/d6.png');
}

.dice-card[data-die="d8"]::before {
    background-image: url('images/d8.png');
}

.dice-card[data-die="d10"]::before {
    background-image: url('images/d10.png');
}

.dice-card[data-die="d12"]::before {
    background-image: url('images/d12.png');
}

.dice-card[data-die="d20"]::before {
    background-image: url('images/d20.png');
}

.dice-card:hover::before,
.dice-card.active::before {
    opacity: 0.3;
}

.dice-card:hover {
    transform: translateY(-5px);
    background-color: rgba(244, 241, 234, 0.95);
}

.dice-card>* {
    position: relative;
    z-index: 1;
}

.dice-card h4 {
    font-size: 1.5rem;
    color: #2c1810;
    margin-bottom: 0.5rem;
}

.dice-card p {
    font-size: 0.9rem;
    color: #666;
}

.cta {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cta h3 {
    color: #2c1810;
    margin-bottom: 1rem;
}

.cta a {
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #8b4513;
    transition: color 0.3s;
}

.cta a:hover {
    color: #2c1810;
}

footer {
    background-color: #2c1810;
    color: #f4f1ea;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .sub-container {
        padding: 0 15px;
    }

    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    nav ul {
        gap: 0.5rem;
        justify-content: center;
    }

    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    main {
        padding: 1rem 0;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .content,
    .sub-content {
        padding: 1.5rem;
    }

    .content h3,
    .sub-content h3 {
        font-size: 1.5rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    .content ul,
    .sub-content ul {
        margin-left: 1.5rem;
    }

    .dice-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .dice-card {
        padding: 1rem;
    }

    .dice-card h4 {
        font-size: 1.2rem;
    }

    .cta {
        padding: 1.5rem;
    }

    footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }

    nav ul {
        gap: 0.4rem;
    }

    nav a {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .content {
        padding: 1rem;
    }

    .content h3 {
        font-size: 1.3rem;
    }

    .dice-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }

    .submit-btn {
        width: 100%;
        padding: 0.875rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c1810;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b4513;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background-color: #2c1810;
    color: #f4f1ea;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #4a2818;
}

/* Small info box style for the Goal */
.info-box {
    background: #e8f4ff;
    /* very light blue */
    border: 1px solid #b6e0ff;
    color: #0b3666;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0.75rem 0;
}

.info-box p {
    text-align: center;
    margin: 0;
}

.center-text {
    text-align: center;
}