/* cardviewer.css */

:root {
    --primary-color: #0462b3;
    --secondary-color: #a1fcff;
    --background-color: #fffbce;
    --text-color: #111;
    --button-color: #0462b3;
    --button-hover-color: #a1fcff;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Reset some defaults */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #fffbce;
}

/* Header styles */
#header {
    width: 100%;
    /* height: min(10vh, 40px); */
    background: #0462b3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--secondary-color);
}
#header h1 {
    color: var(--background-color);
    margin: 0;
    font-size: 1.5em;
    text-align: center;
    font-weight: lighter;
    font-family: 'RubikMonoOne', Arial, sans-serif;
}
#cardDisplay {
    height: max(50%, 400px);
    width: auto;
    display: block;
    margin: 0 auto;
}
/* Card viewer container */
#cardViewer {
    width: 100%;
    /* height: calc(100vh - min(10vh, 40px)); */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
}

#cardViewer p {
    width: min(max(300px, 50%), 95%);
    text-align: center;
    padding: 1em;
    font-family: 'MartianMono', Arial, sans-serif;
}

#cardViewer button {
    margin: 2px;
    font-family: 'MartianMono', Arial, sans-serif;
}
#buttonContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    max-width: 400px;
    justify-content: center;
    align-items: center;
    margin: 1em auto;
}
/* Input and buttons */
#cardInput {
    padding: 0.5em;
    font-size: 1em;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    outline: none;
    text-align: center;
    font-family: 'MartianMono', Arial, sans-serif;
}

#cardViewer button {
    padding: 0.5em 1em;
    margin: 0 0.2em;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    background: var(--button-color);
    color: var(--background-color);
    cursor: pointer;
    transition: background 0.2s;
}

#cardViewer button:hover {
    background: var(--button-hover-color);
    color: black;
}

/* Card image */
.cardholder {
    /* margin-top: 1em; */
    max-width: 90vw;
    max-height: 70vh;
    overflow: hidden;
    display: block;
}

@font-face {
    font-family: 'RubikMonoOne';
    src: url('fonts/RubikMonoOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MartianMono';
    src: url('fonts/MartianMono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MajorMonoDisplay';
    src: url('fonts/MajorMonoDisplay-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


@keyframes shakeInput {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

#cardInput.shake {
    animation: shakeInput 0.25s;
    border-color: #e74c3c;
    background: #ffeaea;
}