:root {
    --bg-primary: #111827;
    --bg-secondary: #2a2b3d;
    --bg-card: #34364a;
    --bg-card-hover: #3d4057;
    --bg-card-active: #4a4e6b;
    --text-primary: #e6e7ef;
    --text-secondary: #a1a3b9;
    --accent: #6c5ce7;
    --accent-hover: #7d70ea;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --border: #43465a;
    --success: #00b894;
    --success-hover: #00a884;
    --notification-error-bg: #8B0000;

    /* Class Colors */
    --class-dk: #C41E3A;
    --class-dh: #A330C9;
    --class-druid: #FF7C0A;
    --class-evoker: #33937F;
    --class-hunter: #AAD372;
    --class-mage: #3FC7EB;
    --class-monk: #00FF98;
    --class-paladin: #F48CBA;
    --class-priest: #FFFFFF;
    --class-rogue: #FFF468;
    --class-shaman: #0070DD;
    --class-warlock: #8788EE;
    --class-warrior: #C69B6D;
}

* {
    box-sizing: border-box;
}

p {
    margin: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    margin: 0;
    line-height: 1.5;
}

#main-content {
    min-height: 800px;
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Utility Classes */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.grid {
    display: grid;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-0\.5 {
    gap: 0.125rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-8 {
    margin-top: 2rem;
    margin-top: 2rem;
}

.mt-16 {
    margin-top: 4rem;
}

.w-full {
    width: 100%;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-14 {
    width: 3.5rem;
}

.h-14 {
    height: 3.5rem;
}

.h-16 {
    height: 4rem;
}

.h-10 {
    height: 2.5rem;
}

.min-h-screen {
    min-height: 100vh;
}

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

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

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-2 {
    border-width: 2px;
    border-style: solid;
}

#header {
    background-color: var(--bg-secondary);
}

#app > footer {
    margin-top: 4rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.border-transparent {
    border-color: transparent;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.relative {
    position: relative;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-20 {
    z-index: 20;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 1rem;
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem;
}

/* Component Specific Styles */
.picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .picker-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .picker-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .picker-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.tools-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1rem;
}

@media (min-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .tools-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.tool-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.tool-card:hover {
    border-color: var(--accent);
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
}

.randomizer-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .randomizer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .randomizer-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.player-card {
    background-color: var(--bg-card);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease-in-out;
}

.player-card:hover {
    border-color: var(--accent);
}

.picker-item-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
}

.picker-item-container:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.picker-item-container.deactivated-manual {
    opacity: 0.8;
    filter: grayscale(80%);
    transform: scale(0.95);
    background-color: #4a2c2c; /* Approximation of color-mix with red */
    border: 1px solid transparent;
}

.picker-item-container.deactivated-loser {
    opacity: 0.4;
    filter: grayscale(80%);
    transform: scale(0.95);
    border: 1px solid transparent;
}

.picker-item-container.winner-highlight {
    border-color: var(--success);
    box-shadow: 0 0 15px var(--success);
    transform: scale(1.05);
    opacity: 1;
    filter: none;
}

.picker-btn {
    background-color: var(--accent);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    cursor: pointer;
    border: none;
    color: white;
}

.picker-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.picker-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.picker-btn.danger {
    background-color: var(--danger);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

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

button {
    font-family: inherit;
}

input[type="text"] {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    color: white;
}

input[type="text"]:focus {
    border-color: var(--accent);
    outline: none;
}

.role-btn {
    border: none;
    cursor: pointer;
    background-color: var(--bg-primary);
}

.role-btn:hover {
    background-color: var(--bg-card);
}

.role-btn.active {
    background-color: var(--accent);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
