/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fff;
    color: #1a1a1a;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app {
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Camera Screen */
.camera-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
}

#camera-feed {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    display: none;
    background: #fff;
}

.ascii-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    color: rgba(0,0,0,0.6);
    font-family: 'IBM Plex Mono', 'Fira Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.8vw;
    line-height: 1.15;
    font-weight: 100;
    white-space: pre-wrap;
    user-select: none;
    letter-spacing: 0.15vw;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

.tracking-rectangle {
    position: absolute;
    border: 2px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s ease;
}

.tracking-rectangle.hidden {
    opacity: 0;
}

/* Remove header and overlay styles */

/* Scan Button */
.scan-button {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #1a1a1a;
    border: none;
    border-radius: 16px;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    z-index: 1000;
}

.scan-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.scan-button.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Loading Screen */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 32px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.loading-content p {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
}

/* Result Screen */
.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.result-icon {
    width: 80px;
    height: 80px;
    background: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-weight: 600;
}

.result-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.result-text {
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a4a;
    font-weight: 400;
    margin-bottom: 40px;
}

/* Restart Button */
.restart-button {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.restart-button:hover {
    transform: translateX(-50%) translateY(-2px);
    background: #000000;
}

/* Button Text */
.button-text {
    display: block;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Responsive Design */
@media (max-width: 480px) {
    .scan-button,
    .restart-button {
        bottom: 30px;
        padding: 18px 32px;
        font-size: 16px;
        min-width: 180px;
    }
    .result-content {
        padding: 30px 20px;
    }
    .result-content h2 {
        font-size: 24px;
    }
    .result-text {
        font-size: 16px;
    }
    .loading-content h2 {
        font-size: 20px;
    }
    .loading-content p {
        font-size: 14px;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
} 