/*
  Gruvbox Palette
  --------------------
  Hard BG:    #282828
  Panel BG:   #3c3836
  Light BG:   #f2e5bc
  Dark Yellow:#b57614
  Foreground: #ebdbb2
  Dark Text:  #282828
  Purple:     #d3869b
  Aqua:       #8ec07c
  Red:        #fb4934
  Green:      #b8bb26
*/

body {
    background-color: #282828;
    font-family: 'Fira Code', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.main-window {
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    min-height: 600px;
    background-color: #f2e5bc;
    border: 4px solid #1d2021;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-header {
    background-color: #d69122;
    padding: 10px;
    border-bottom: 4px solid #1d2021;
    flex-shrink: 0;
}

.tab-container {
    display: flex;
    gap: 8px;
}

.tab-link {
    font-family: 'Fira Code', monospace;
    font-size: 1em;
    padding: 8px 16px;
    border: 4px solid #282828;
    border-radius: 8px;
    background-color: #f2e5bc;
    color: #282828;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.tab-link:hover {
    background-color: #fbf1c7;
}

.tab-link.active {
    background-color: #d3869b; /* Gruvbox Purple */
    color: #282828;
    border-color: #282828;
}

.content-area {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.left-panel {
    flex-basis: 65%;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.right-panel {
    flex-basis: 35%;
    border-left: 4px solid #282828;
    background-color: #ebdbb2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-heading {
    font-family: 'Bungee', cursive;
    color: #282828;
    padding: 15px;
    margin: 0;
    background-color: #d5c4a1;
    border-bottom: 4px solid #282828;
    text-align: center;
}

#collection-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px;
}

.collection-item {
    display: flex;
    align-items: center;
    background: #f2e5bc;
    border: 2px solid #3c3836;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.collection-item img {
    width: 60px;
    height: auto;
    margin-right: 10px;
    border-radius: 4px;
}

.collection-item-info p {
    margin: 0;
    color: #3c3836;
}
.collection-item-info .card-name {
    font-weight: bold;
    color: #282828;
}


.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.retro-heading {
    font-family: 'Bungee', cursive;
    font-size: 3.5em;
    color: #282828;
    line-height: 1.1;
    margin-bottom: 20px;
}

.tab-content p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #3c3836;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scanner Specific Styles */
#scanner-ui {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border: 4px solid #282828;
    border-radius: 8px;
    overflow: hidden;
    background: #1d2021;
}

#video-feed {
    width: 100%;
    display: block;
    transform: scaleX(-1); /* Mirror mode */
}

#video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.card-outline {
    width: 80%;
    height: 20%;
    border: 3px dashed #fbf1c7;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.overlay-text {
    color: #fbf1c7 !important;
    text-shadow: 0 0 5px #000;
    margin-top: 10px !important;
    font-weight: bold;
}

#controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.action-btn {
    font-family: 'Fira Code', monospace;
    font-size: 1.1em;
    padding: 10px 20px;
    border: 4px solid #282828;
    border-radius: 8px;
    background-color: #8ec07c; /* Aqua */
    color: #282828;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.action-btn:hover:not(:disabled) {
    background-color: #b8bb26; /* Green */
}

.action-btn:disabled {
    background-color: #928374;
    cursor: not-allowed;
    opacity: 0.7;
}

#status-messages {
    text-align: center;
    font-size: 1.1em;
    color: #282828;
    font-weight: bold;
    min-height: 25px;
}