* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.app {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    color: #a0aec0;
    font-size: 0.9rem;
}

main {
    flex: 1;
}

/* Camera Section */
.camera-section {
    text-align: center;
    margin: 20px 0;
}

.camera-btn {
    display: inline-block;
    padding: 18px 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.camera-btn:active {
    transform: scale(0.95);
}

#camera-input {
    display: none;
}

/* Preview */
.preview-section {
    margin: 20px 0;
    text-align: center;
}

.preview-section img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    border: 2px solid #4a5568;
}

.scan-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #38b2ac 0%, #4fd1c5 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.scan-btn:active {
    transform: scale(0.95);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-sub {
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Results */
.results-section {
    margin: 20px 0;
}

.results-section h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.result-card .game-info {
    flex: 1;
}

.result-card .game-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.result-card .game-platform {
    font-size: 0.8rem;
    color: #a0aec0;
}

.result-card .game-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #68d391;
    white-space: nowrap;
    margin-left: 10px;
}

.result-card.not-found {
    opacity: 0.6;
}

.result-card.not-found .game-price {
    color: #a0aec0;
    font-size: 0.9rem;
}

.total-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(104, 211, 145, 0.15);
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid rgba(104, 211, 145, 0.3);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #718096;
    font-size: 0.8rem;
}

/* Utility */
.hidden {
    display: none !important;
}


/* Platform Selector */
.platform-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    justify-content: center;
}

.platform-selector label {
    font-size: 0.9em;
    color: #ccc;
}

.platform-selector select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
}
