/* Duris Cards - Base Styles (reset, typography, header, navigation, buttons) */

/* Texture Patterns */
.texture-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

body {
    font-family: var(--font-family-body);
    background: var(--bg-dark);
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(ellipse at top, rgba(45,36,24,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(107,63,160,0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139,26,26,0.08) 0%, transparent 30%),
        linear-gradient(180deg, var(--bg-dark) 0%, #0a0806 100%);
    color: var(--text-light);
    min-height: 100vh;
    font-size: var(--font-size-lg);
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--padding-md);
    position: relative;
    z-index: var(--z-base);
}
h1, h2, h3, h4 {
    font-family: var(--font-family-display);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 1px;
}
h1 {
    text-align: center;
    color: var(--gold);
    margin-bottom: var(--gap-md);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), var(--shadow-glow-gold);
    font-size: var(--font-size-title);
}
/* Unified Header Bar */
.unified-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(45,36,24,0.95) 0%, rgba(26,20,16,0.98) 100%);
    border: 2px solid var(--border-bronze);
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 12px rgba(0,0,0,0.5);
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}
body[data-theme="bloodlust"] .unified-header,
:root[data-theme="bloodlust"] .unified-header {
    background: linear-gradient(180deg, rgba(48,12,16,0.95) 0%, rgba(22,10,12,0.98) 100%);
    border-color: var(--border-bronze);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 16px rgba(0,0,0,0.6);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.game-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.3em;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-weight: bold;
}
.game-title-sub {
    font-size: 0.65em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.header-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}
.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border-bronze);
    margin: 0 4px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.deck-quick-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-bronze);
}
.deck-quick-label {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.deck-display-select {
    appearance: none;
    border: none;
    background: rgba(139, 90, 43, 0.9);
    color: #fff;
    font-weight: bold;
    padding: 6px 28px 6px 10px;
    cursor: pointer;
}
.deck-display-select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.deck-display-select:hover {
    box-shadow: var(--shadow-md);
}
.btn-sm {
    padding: 5px 10px !important;
    font-size: 12px !important;
}
.collection-note {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 10px;
    margin-top: 6px;
}
.collection-load-more {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 12px 0 4px;
}

/* Admin Page */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.admin-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1.2fr;
    gap: 12px;
}
.admin-panel-wide {
    grid-column: 1 / -1;
}
.admin-panel {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-bronze);
    border-radius: var(--radius-md);
    padding: 10px;
    min-height: 320px;
}
.admin-panel h3 {
    margin-bottom: 8px;
    color: var(--gold);
}
.admin-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.admin-panel-header input {
    flex: 1;
    border: 1px solid var(--border-bronze);
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 6px 8px;
    border-radius: 6px;
}
.admin-list {
    max-height: 420px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-list button {
    text-align: left;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-bronze);
    color: var(--text-light);
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.admin-list button.active {
    border-color: var(--gold);
    box-shadow: var(--shadow-glow-gold);
}
.admin-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-details label {
    font-size: 12px;
    color: var(--text-muted);
}
.admin-details input, .admin-details select, .admin-details textarea {
    width: 100%;
    border: 1px solid var(--border-bronze);
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 6px 8px;
    border-radius: 6px;
}
.admin-details textarea {
    min-height: 140px;
    font-family: monospace;
    font-size: 12px;
}
.admin-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.admin-card-row {
    display: grid;
    grid-template-columns: 1fr 70px auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-bronze);
    border-radius: 6px;
}
.admin-card-row input {
    text-align: center;
}
.admin-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}
.admin-card-meta span {
    color: var(--text-muted);
}
.admin-card-add {
    display: grid;
    grid-template-columns: 1fr 80px auto;
    gap: 8px;
    align-items: center;
}

/* Connection indicator */
.connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
    flex-shrink: 0;
}
.connection-dot.connected {
    background: #00cc44;
    color: #00cc44;
    animation: pulse-green 2s infinite;
}
.connection-dot.disconnected {
    background: #cc3333;
    color: #cc3333;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 8px #00cc44; }
    50% { box-shadow: 0 0 15px #00ff55; }
}

/* Navigation tabs */
.nav-tabs {
    display: flex;
    gap: 4px;
}
.nav-btn {
    font-family: 'Cinzel', serif;
    padding: 6px 14px;
    background: transparent;
    border: 2px solid var(--border-dark);
    border-radius: 4px 4px 0 0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.nav-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}
.nav-btn.active {
    background: var(--bg-panel);
    color: var(--gold);
    border-color: var(--gold);
    border-bottom-color: var(--bg-panel);
}

.btn {
    font-family: 'Cinzel', serif;
    padding: 8px 14px;
    border: 2px solid var(--border-bronze);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    background: linear-gradient(180deg, #4a3d2e 0%, #2d2418 100%);
    color: var(--text-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 4px rgba(0,0,0,0.3);
    touch-action: manipulation;
}
.btn:hover {
    background: linear-gradient(180deg, #5a4d3e 0%, #3d3428 100%);
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(201,162,39,0.3);
}
.btn-primary {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #1a1410;
    border-color: var(--gold-light);
}
.btn-primary:hover {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(201,162,39,0.5);
}
.btn-danger {
    background: linear-gradient(180deg, #9a2a2a 0%, var(--blood-red) 100%);
    color: var(--text-light);
    border-color: #b33a3a;
}
.btn-danger:hover {
    background: linear-gradient(180deg, #aa3a3a 0%, #9b2a2a 100%);
}
.btn-warning {
    background: linear-gradient(180deg, #d4a22a 0%, #b8860b 100%);
    color: #1a1a1a;
    border-color: #daa520;
    font-weight: bold;
}
.btn-warning:hover {
    background: linear-gradient(180deg, #e4b23a 0%, #c8960b 100%);
}
.flash-btn {
    animation: flash-pulse 1s ease-in-out infinite;
}
@keyframes flash-pulse {
    0%, 100% { box-shadow: 0 0 5px #ffd700; }
    50% { box-shadow: 0 0 20px #ffd700, 0 0 30px #ff8c00; }
}
.btn-success {
    background: linear-gradient(180deg, #3d7a37 0%, var(--forest-green) 100%);
    color: var(--text-light);
    border-color: #4d8a47;
}
.btn-success:hover {
    background: linear-gradient(180deg, #4d8a47 0%, #3d7a37 100%);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
