:root {
    --bg-color: #0d0d0d;
    --card-bg: #1a1a1a;
    --accent: #ff0055;
    --accent-glow: rgba(255, 0, 85, 0.5);
    --text: #ffffff;
    --text-dim: #b3b3b3;
    --gold: #ffd700;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.logo span {
    color: var(--accent);
    font-style: italic;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.guide {
    width: 80%;
    height: 40%;
    border: 2px dashed var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.premium-select {
    background: #2a2a2a;
    color: white;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.glow-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
}

.glow-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 5px var(--accent-glow);
}

.hidden {
    display: none !important;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
    color: var(--gold);
}

.extracted-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.data-item {
    background: #252525;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.data-item span {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 5px;
}

.data-item p {
    font-size: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent);
}

.prediction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.prediction-item {
    display: flex;
    align-items: center;
    background: #252525;
    padding: 12px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.setting-label {
    width: 60px;
    font-weight: bold;
    z-index: 1;
}

.prob-bar-container {
    flex-grow: 1;
    height: 10px;
    background: #333;
    border-radius: 5px;
    margin: 0 15px;
    position: relative;
    z-index: 1;
}

.prob-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 5px;
    transition: width 1s ease-out;
}

.prob-val {
    width: 50px;
    text-align: right;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    z-index: 1;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.outline-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

.qr-container {
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.qr-container img {
    width: 150px;
    height: 150px;
}

.url-text {
    color: var(--bg-color);
    font-size: 0.8rem;
    margin-top: 5px;
    font-family: monospace;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}