/* ============================================
   らいとマッチ - Brand Design System
   Dark × Gold Luxury Theme
   ============================================ */

/* --- Base Reset & Transitions --- */
* {
    transition-property: color, background-color, border-color, box-shadow, opacity, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

html {
    scroll-behavior: smooth;
}

/* --- Selection color --- */
::selection {
    background: rgba(201, 168, 78, 0.3);
    color: #EAEAEA;
}

/* --- Upload area hover effects --- */
.upload-area-active {
    border-color: #C9A84E !important;
    background-color: rgba(201, 168, 78, 0.05) !important;
}

/* --- Image preview styling --- */
.preview-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-container .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(201, 168, 78, 0.3);
    color: #C9A84E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-container:hover .remove-btn {
    opacity: 1;
}

/* --- Loading overlay --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-card {
    background: #1a1a1a;
    border: 1px solid rgba(201, 168, 78, 0.15);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(201, 168, 78, 0.05);
}

/* --- Pulse animation for loading --- */
@keyframes pulse-dot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C9A84E;
    margin: 0 5px;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

.pulse-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.pulse-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* --- Toast animation --- */
@keyframes slide-up {
    from {
        transform: translateY(1rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-show {
    animation: slide-up 0.3s ease-out;
}

/* --- Gold glow effect for buttons --- */
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 168, 78, 0.2), transparent, rgba(201, 168, 78, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-gold:hover::before {
    opacity: 1;
}

/* --- Subtle gold border glow on cards --- */
.card-glow {
    position: relative;
}

.card-glow::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(201, 168, 78, 0.1), transparent, rgba(201, 168, 78, 0.05));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.card-glow:hover::after {
    opacity: 1;
}

/* --- Decorative line (match stick accent) --- */
.accent-line {
    width: 2px;
    height: 24px;
    background: linear-gradient(to bottom, #C9A84E, transparent);
    border-radius: 1px;
}

/* --- Light breathing animation --- */
@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.glow-breathe {
    animation: breathe 3s ease-in-out infinite;
}

/* --- Scrollbar styling (dark) --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* --- Input focus ring override --- */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 168, 78, 0.3);
    border-color: #C9A84E !important;
}

/* --- Subtle text gradient for headings --- */
.text-gold-gradient {
    background: linear-gradient(135deg, #d4b85a, #C9A84E, #b8973f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
