body {
    background-color: #0a1525;
    font-family: 'Rajdhani', sans-serif;
    color: #a9cefb;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 21, 37, 0.85), rgba(15, 31, 54, 0.8));
    z-index: -1;
}

h1, h2, h3, .medieval-title {
    font-family: 'Rajdhani', sans-serif;
    color: #7ecef4;
    text-shadow: 0 0 10px rgba(0, 162, 255, 0.5);
    letter-spacing: 1px;
    font-weight: 600;
}

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

.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(10, 21, 37, 0.7);
    border: none;
    position: relative;
    box-shadow: 0 0 20px rgba(126, 206, 244, 0.3);
    clip-path: polygon(0% 0%, 100% 0%, 97% 100%, 3% 100%);
    overflow: visible;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0a1525, #7ecef4, #0a1525);
}

.header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0a1525, #7ecef4, #0a1525);
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #7ecef4;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
}

.header h1::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 2px;
    background: #7ecef4;
    top: 50%;
    left: -50px;
}

.header h1::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 2px;
    background: #7ecef4;
    top: 50%;
    right: -50px;
}

.card {
    background: rgba(10, 21, 37, 0.7);
    border: 1px solid rgba(126, 206, 244, 0.3);
    box-shadow: 0 0 15px rgba(126, 206, 244, 0.2);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    clip-path: polygon(
        0% 0%, 
        100% 0%, 
        100% 85%, 
        97% 100%, 
        3% 100%, 
        0% 85%
    );
    padding-bottom: 15px;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0a1525, #7ecef4, #0a1525);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(126, 206, 244, 0.4);
}

.card-header {
    background: linear-gradient(135deg, #0a1525, #0f3564);
    border-bottom: none;
    padding: 15px 20px;
    position: relative;
    clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 2% 100%);
}

.card-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.5), transparent);
}

.card-header h2 {
    position: relative;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 1.4rem;
    font-weight: 600;
}

.card-header h2::before {
    content: "›";
    margin-right: 10px;
    font-size: 1.8rem;
    color: #7ecef4;
}

.card-body {
    padding: 20px;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #0a1525, #7ecef4);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 10px rgba(126, 206, 244, 0.3);
    clip-path: polygon(10px 0%, calc(100% - 10px) 0%, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0% calc(100% - 10px), 0% 10px);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7ecef4, #0a1525);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(126, 206, 244, 0.6);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(126, 206, 244, 0.4);
}

.input-group {
    margin-bottom: 15px;
    position: relative;
}

.input-group::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.5), transparent);
}

.input-group-text {
    background: linear-gradient(135deg, #0a1525, #0f3564);
    color: #7ecef4;
    border: 1px solid rgba(126, 206, 244, 0.3);
    font-weight: bold;
    clip-path: polygon(0% 0%, 90% 0%, 100% 100%, 0% 100%);
    padding-right: 20px;
}

.form-control, .form-select {
    background-color: rgba(10, 21, 37, 0.7);
    border: 1px solid rgba(126, 206, 244, 0.3);
    color: #a9cefb;
    transition: all 0.3s;
    padding: 10px 15px;
    height: 45px;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(10, 21, 37, 0.8);
    border-color: #7ecef4;
    box-shadow: 0 0 0 0.25rem rgba(126, 206, 244, 0.25);
    color: #fff;
}

.accordion {
    margin-bottom: 30px;
    position: relative;
}

.accordion::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.5), transparent);
}

.accordion::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.5), transparent);
}

.accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 5px;
}

.accordion-button {
    background: linear-gradient(135deg, #0a1525, #0f3564);
    color: #7ecef4;
    padding: 15px 20px;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 2% 100%);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #0f3564, #0a1525);
    color: #7ecef4;
    box-shadow: 0 0 10px rgba(126, 206, 244, 0.3);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(126, 206, 244, 0.5);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%237ecef4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    background: rgba(10, 21, 37, 0.4);
    color: #a9cefb;
    border: 1px solid rgba(126, 206, 244, 0.1);
    border-top: none;
    padding: 20px;
    position: relative;
}

.accordion-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.3), transparent);
}

#diceResult {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(126, 206, 244, 0.7);
    padding: 15px;
    background: rgba(10, 21, 37, 0.6);
    border: 1px solid rgba(126, 206, 244, 0.3);
    margin: 15px 0;
    clip-path: polygon(0% 0%, 100% 0%, 95% 100%, 5% 100%);
    letter-spacing: 2px;
}

#diceTotal {
    font-size: 2.2rem;
    color: #7ecef4;
    text-shadow: 0 0 10px rgba(126, 206, 244, 0.7);
    font-weight: bold;
    display: inline-block;
    padding: 5px 20px;
    margin-top: 10px;
    position: relative;
}

#diceTotal::before,
#diceTotal::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    background: #7ecef4;
}

#diceTotal::before {
    left: -10px;
    transform: translateY(-50%);
}

#diceTotal::after {
    right: -10px;
    transform: translateY(-50%);
}

.table {
    color: #a9cefb;
    background: rgba(10, 21, 37, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.table thead {
    background: linear-gradient(135deg, #0a1525, #7ecef4);
}

.table th {
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
    padding: 15px;
}

.table td {
    border-top: 1px solid rgba(126, 206, 244, 0.2);
    padding: 12px 15px;
}

.table tbody tr:hover {
    background: rgba(126, 206, 244, 0.1);
}

.table-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    vertical-align: middle;
    display: inline-block;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(126, 206, 244, 0.7), rgba(10, 21, 37, 0.7));
    box-shadow: 0 0 10px rgba(126, 206, 244, 0.5);
}

.icon-room::before {
    content: "🏰";
}

.icon-special-elements::before {
    content: "✨";
}

.icon-special-events::before {
    content: "⚡";
}

.icon-treasure::before {
    content: "💎";
}

.icon-magic-items::before {
    content: "🔮";
}

.icon-vermin::before {
    content: "🐀";
}

.icon-minions::before {
    content: "👻";
}

.icon-boss::before {
    content: "👑";
}

.monster-undead::before {
    content: "💀";
}

.decorative-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(126, 206, 244, 0.7), transparent);
    margin: 2rem 0;
    border: none;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 21, 37, 0.7);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0a1525, #7ecef4);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7ecef4, #0a1525);
}

.accordion-button:hover {
    text-shadow: 0 0 10px rgba(126, 206, 244, 0.9);
}

.badge {
    background: linear-gradient(135deg, #0a1525, #7ecef4);
    color: #a9cefb;
    font-family: 'Rajdhani', sans-serif;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes diceRoll {
    0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
    25% { transform: scale(1.05) rotate(-2deg); filter: brightness(1.3); }
    50% { transform: scale(1.1) rotate(2deg); filter: brightness(1.5); }
    75% { transform: scale(1.05) rotate(-1deg); filter: brightness(1.3); }
    100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

@keyframes glow {
    0% { text-shadow: 0 0 10px rgba(126, 206, 244, 0.7); }
    50% { text-shadow: 0 0 20px rgba(126, 206, 244, 0.9), 0 0 30px rgba(126, 206, 244, 0.5); }
    100% { text-shadow: 0 0 10px rgba(126, 206, 244, 0.7); }
}

#diceResult.animate, #diceTotal.animate {
    animation: glow 1.5s infinite, diceRoll 0.5s ease-in-out;
}

.table {
    color: #a9cefb;
    background: rgba(10, 21, 37, 0.4);
    border-radius: 0;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 0 15px rgba(126, 206, 244, 0.2);
    position: relative;
}

.table::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7ecef4, transparent);
}

.table thead {
    background: linear-gradient(135deg, #0a1525, #0f3564);
}

.table th {
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Rajdhani', sans-serif;
    padding: 15px;
    font-weight: 600;
    color: #7ecef4;
    position: relative;
}

.table td {
    border-top: 1px solid rgba(126, 206, 244, 0.1);
    padding: 12px 15px;
    position: relative;
}

.table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.table tbody tr:hover {
    background: rgba(126, 206, 244, 0.1);
}

.table tbody tr:hover::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #7ecef4;
}

.table-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    vertical-align: middle;
    display: inline-block;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    position: relative;
    z-index: 1;
}

.table-icon::before {
    filter: drop-shadow(0 0 5px rgba(126, 206, 244, 0.7));
}

.header {
    position: relative;
    overflow: hidden;
}

.header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(126, 206, 244, 0) 0%, 
        rgba(126, 206, 244, 0.05) 50%, 
        rgba(126, 206, 244, 0) 100%);
    background-size: 100% 10px;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(126, 206, 244, 0) 0%, 
        rgba(126, 206, 244, 0.03) 50%, 
        rgba(126, 206, 244, 0) 100%);
    background-size: 100% 8px;
    animation: scanline 15s linear infinite;
    pointer-events: none;
    z-index: 1;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(126, 206, 244, 0.1) 0%, 
        rgba(126, 206, 244, 0) 100%);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-primary:hover::after {
    background: linear-gradient(135deg, 
        rgba(126, 206, 244, 0.2) 0%, 
        rgba(126, 206, 244, 0.1) 100%);
}

.random-dice-btn {
    cursor: pointer;
    margin-left: 10px;
    color: #7ecef4;
    background: none;
    border: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: relative;
}

.random-dice-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(126, 206, 244, 0.7);
    transform: scale(1.1);
}

.random-dice-btn:active {
    transform: scale(0.95);
}

.random-dice-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(126, 206, 244, 0.1);
    border-radius: 50%;
    z-index: -1;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.random-dice-btn:hover::before {
    transform: scale(1);
}

.random-item {
    background: rgba(126, 206, 244, 0.1);
    border-left: 3px solid #7ecef4;
    padding: 10px;
    margin: 10px 0;
    animation: highlightItem 2s ease-in-out;
    position: relative;
}

@keyframes highlightItem {
    0% { background: rgba(126, 206, 244, 0.3); }
    100% { background: rgba(126, 206, 244, 0.1); }
}

#randomResultToast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 21, 37, 0.9);
    border: 1px solid rgba(126, 206, 244, 0.5);
    color: #7ecef4;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(126, 206, 244, 0.3);
    z-index: 1050;
    display: none;
    max-width: 350px;
    font-family: 'Rajdhani', sans-serif;
    animation: toastFadeIn 0.5s ease-in-out;
}

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

#randomResultToast .toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(126, 206, 244, 0.3);
    padding-bottom: 5px;
}

#randomResultToast .toast-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #7ecef4;
    margin: 0;
}

#randomResultToast .toast-close {
    background: none;
    border: none;
    color: #7ecef4;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#randomResultToast .toast-close:hover {
    opacity: 1;
}

#randomResultToast .toast-body {
    font-size: 1rem;
}
