:root {
    color-scheme: dark;
    --gold-primary: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.4);
    --gold-secondary: #DAA520;
    --dark-bg: #050505;
    --dark-surface: #0a0a0b;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(20, 20, 25, 0.6);
    --glass-bg-hover: rgba(30, 30, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --blur-strength: 16px;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(60, 20, 100, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 1) 0%, transparent 100%);
    background-attachment: fixed;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Outfit:wght@300;400;600&display=swap');

.brand-font {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.text-gold {
    color: var(--gold-primary) !important;
}

.text-gradient-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-secondary);
}

.btn-primary-theme {
    background: var(--gold-gradient);
    border: none;
    color: #000;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-theme::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary-theme:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
    color: #000;
}

.btn-primary-theme:hover::after {
    opacity: 1;
}

.btn-outline-theme {
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    background: rgba(255, 215, 0, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.btn-outline-theme:hover {
    background: var(--gold-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.form-control {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    transition: all 0.3s;
}

.form-select {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    transition: all 0.3s;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23FFD700' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus,
.form-select:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
    color: #fff;
    outline: none;
}

.form-select option {
    background-color: #0a0a0b;
    color: #e0e0e0;
    padding: 10px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.symbol-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-section {
    padding: 8rem 0 10rem;
    position: relative;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(100, 50, 255, 0.08) 0%, rgba(255, 215, 0, 0.03) 50%, transparent 80%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.glass-panel {
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 2rem;
    margin-top: -3rem;
}

.glass-panel .form-label {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    font-weight: 600;
}

.yugioh-card-container {
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

.yugioh-card-container::before {
    display: none;
}

.yugioh-card-container:hover {
    transform: translateY(-10px);
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 10;
    cursor: pointer;
}

.card-img-top {
    border-radius: var(--radius-sm);
    width: 100%;
    aspect-ratio: 268/391;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
    filter: brightness(0.9);
}

.yugioh-card-container:hover .card-img-top {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(255, 215, 0, 0.4);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.02), transparent);
    padding: 2rem 2.5rem;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.modal-body {
    padding: 2.5rem;
}

.modal-img-wrapper {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.stat-badge {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: default;
}

.stat-badge:has(#modalAtk):hover {
    border-color: #ff4d4d;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.2), inset 0 0 10px rgba(255, 77, 77, 0.1);
}

.stat-badge:has(#modalDef):hover {
    border-color: #4d94ff;
    box-shadow: 0 0 20px rgba(77, 148, 255, 0.2), inset 0 0 10px rgba(77, 148, 255, 0.1);
}

.desc-box {
    margin-top: 2.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.desc-box::before {
    content: "LORE / EFFECT";
    display: block;
    background: rgba(255, 215, 0, 0.05);
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-secondary);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.desc-box p {
    padding: 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #e0e0e0;
}

.download-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.btn-glass-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 12px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-glass-action:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--gold-primary);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.loader-container {
    display: flex;
    justify-content: center;
    padding: 3rem;
    width: 100%;
    min-height: 150px;
}

.loader-container .spinner-glow {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-right-color: var(--gold-primary);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    box-shadow: 0 0 15px var(--gold-glow);
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.loader-container:not(.active) .spinner-glow {
    display: none;
}
