:root {
    --paper-color: #fdfbf7;
    --line-color: #a4b0be;
    --accent-color: #ff6b6b;
    --text-color: #2f3542;
    --font-hand: 'Comic Neue', cursive, sans-serif;
    /* Fallback to free font */
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #eccc68;
    background-image: url('./image.png');
    background-size: cover;
    background-position: center;
    /* Desk/Wood color */
    font-family: var(--font-body);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Notebook Page Style */
.page {
    background-color: var(--paper-color);
    background-image: linear-gradient(var(--line-color) 1px, transparent 1px);
    background-size: 100% 1.5em;
    /* Line height */
    padding: 3rem 2rem;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    position: relative;
    line-height: 1.5em;
    margin-bottom: 2rem;
}

.page::before {
    /* Holes */
    content: '';
    position: absolute;
    top: 0;
    left: 15px;
    bottom: 0;
    width: 10px;
    background-image: radial-gradient(#eccc68 20%, transparent 20%);
    background-size: 1px 1.5em;
    background-position: 0 10px;
}

h1,
h2,
h3 {
    font-family: var(--font-hand);
    color: var(--accent-color);
    margin-top: 0;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-family: var(--font-hand);
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: var(--paper-color);
    padding: 15px;
    border-radius: 4px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.card:hover {
    transform: rotate(-2deg) scale(1.02);
}

.card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin-bottom: 10px;
}

/* Form Styles */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

label {
    font-weight: bold;
    font-family: var(--font-hand);
    display: block;
    margin-top: 1em;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 8px;
    border: 2px solid #ced6e0;
    border-radius: 8px;
    font-family: var(--font-hand);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.8);
}

input[type="color"] {
    height: 40px;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* Camera */
#camera-container video,
#camera-container canvas {
    width: 100%;
    max-width: 300px;
    border: 4px solid var(--text-color);
    border-radius: 8px;
}

.flash-message {
    background: #7bed9f;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: var(--font-hand);
}

/* Detail View */
.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.detail-header img {
    width: 150px;
    height: 150px;
    border-radius: 10%;
    transform: rotate(-3deg);
    border: 5px solid white;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.answer-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px dashed var(--line-color);
}