@font-face {
    font-family: 'FolioExtraBold';
    src: url('fonts/Folio Extra Bold.otf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'EuropaSH-Med';
    src: url('fonts/EuropaGroteskSH-Med.otf') format('opentype');
    font-weight: normal;
}

@font-face {
    font-family: 'EuropaSH-Bold';
    src: url('fonts/EuropaGroteskSH-Bol.otf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'KarinPro';
    src: url('fonts/Karin Pro.otf') format('opentype');
}

/* Global Styles */
:root {
    --wood-dark: #3e2723;
    --wood-light: #5d4037;
    --paper-white: #f5f5f5;
    --ink-black: #212121;
    --rusty-orange: #d84315;
    --shadow-color: rgba(0, 0, 0, 0.6);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Special Elite', monospace;
    background-color: #5d4037;
    /* Richer wood background for desktop */
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .05) 50%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, .05) 50%, transparent 50%);
    background-size: 100px 100px;
    background-blend-mode: overlay;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.main-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px outset #555;
    max-width: 600px;
}

.desk-header {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 0.5rem;
    color: #fff;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    /* Responsive font size */
    margin-bottom: 0.5rem;
    font-family: 'Permanent Marker', cursive;
}

/* Drawer Container */
.drawer-container {
    position: fixed;
    bottom: -400px;
    /* Slightly lower since it's taller */
    left: 50%;
    transform: translateX(-50%);
    width: min(850px, 95vw);
    height: 460px;
    /* Increased from 380px */
    background-color: #4e342e;
    /* Darker, richer wood */
    background-image: url('https://www.transparenttextures.com/patterns/dark-wood.png');
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.9);
    transition: bottom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    display: flex;
    justify-content: center;
    border: 3px solid #2d1b18;
}

/* Drawer Content */
.drawer-content {
    position: relative;
    width: 92%;
    height: 88%;
    margin-top: 25px;
    background-color: #1a0f0d;
    background-image: radial-gradient(#2d1b18 1px, transparent 1px);
    background-size: 4px 4px;
    /* Felt-like floor texture */
    box-shadow:
        inset 10px 0 20px rgba(0, 0, 0, 0.8),
        inset -10px 0 20px rgba(0, 0, 0, 0.8),
        inset 0 10px 20px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    padding: 30px;
    /* Increased padding to spread items away from edges */
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-around;
    overflow-y: auto;
}

/* Drawer Open State */
.drawer-container.open {
    bottom: 0;
}

/* Handle - Brass Pull */
.drawer-handle {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 35px;
    background: linear-gradient(to bottom, #d4af37, #b8860b, #d4af37);
    border: 2px solid #8b4513;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s;
}

.drawer-handle::before,
.drawer-handle::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #555, #111);
    border-radius: 50%;
    bottom: 5px;
}

.drawer-handle::before {
    left: 10px;
}

.drawer-handle::after {
    right: 10px;
}

.handle-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    font-weight: bold;
    color: #3e2723;
    letter-spacing: 2px;
}

/* Junk Items (Navigation) */
.junk-item {
    text-decoration: none;
    color: var(--ink-black);
    position: relative;
    z-index: 2;
    transition: transform 0.2s, z-index 0s;
    margin: 20px;
    /* More space between cards */
}

.junk-item:hover {
    transform: scale(1.1) rotate(5deg) !important;
    /* Override inline rotation */
    z-index: 100;
}

.visual-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    padding: 10px;
}

/* Rolodex Card Link (in Drawer) */
.rolodex-card-link {
    background-color: #f9f7f0;
    width: 120px;
    height: 90px;
    border-radius: 5px 5px 0 0;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: rotate(2deg);
    border-bottom: 1px solid #ddd;
}

.rolodex-tab-small {
    position: absolute;
    top: -15px;
    left: 10px;
    width: 35px;
    height: 15px;
    background-color: #ddd;
    border-radius: 3px 3px 0 0;
    font-size: 0.6rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.rolodex-label-small {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #444;
    letter-spacing: 1px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 2px;
}

.rolodex-notches-small {
    position: absolute;
    bottom: 8px;
    display: flex;
    gap: 20px;
}

.notch-small {
    width: 10px;
    height: 10px;
    background-color: var(--wood-dark);
    border-radius: 50%;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Specific Item Styles */
.note-paper {
    background-color: #fff9c4;
    background-image:
        linear-gradient(rgba(33, 150, 243, 0.1) 1px, transparent 1px);
    background-size: 100% 1.2rem;
    transform: rotate(-5deg);
    border: 1px solid #fbc02d;
    position: relative;
    box-shadow:
        1px 1px 0 rgba(0, 0, 0, 0.05),
        2px 2px 0 rgba(0, 0, 0, 0.05),
        3px 3px 10px rgba(0, 0, 0, 0.4);
}

.note-paper::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(244, 67, 54, 0.3);
}

.note-paper span {
    font-family: 'Permanent Marker', cursive;
    color: #333;
    font-size: 1.1rem;
    transform: rotate(-2deg);
}

.old-photo {
    background-color: #fff;
    border: 5px solid #fff;
    border-bottom: 20px solid #fff;
    /* Polaroid style */
    transform: rotate(3deg);
    color: #333;
}

.sales-brochure {
    background-color: #fff;
    width: 180px;
    height: 110px;
    padding: 3px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

.sales-brochure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2);
}

.key-chain {
    background-color: #ef5350;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    color: white;
    transform: rotate(10deg);
    border: 2px solid #b71c1c;
    position: relative;
}

.key-chain::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border: 3px solid #999;
    border-radius: 50%;
    z-index: -1;
}

.floppy-disk {
    background-color: #212121;
    width: 90px;
    height: 90px;
    border-radius: 4px;
    position: relative;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.6);
    clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 12%);
    /* Clipped top-left corner */
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 3px 3px;
    /* Grainy plastic texture */
}

.floppy-shutter {
    position: absolute;
    top: 5px;
    left: 20%;
    width: 45px;
    height: 35px;
    background: linear-gradient(90deg, #999 0%, #ccc 50%, #999 100%);
    border: 1px solid #777;
    border-radius: 2px;
    z-index: 2;
}

.floppy-shutter::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 8px;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #555 20%, transparent 60%);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.floppy-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    height: 45px;
    background-color: #f5f5f5;
    background-image: repeating-linear-gradient(transparent, transparent 11px, #e3f2fd 11px, #e3f2fd 12px);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px;
    border: 1px solid #ddd;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.floppy-label span {
    font-family: 'Permanent Marker', cursive;
    color: #1a237e;
    font-size: 0.65rem;
    line-height: 1;
    z-index: 1;
}

.write-protect {
    position: absolute;
    bottom: 5px;
    right: 8px;
    width: 10px;
    height: 10px;
    background-color: #000;
    border-radius: 1px;
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.1);
}

.plumbob {
    width: 10px;
    height: 15px;
    background-color: #76ff03;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    margin-bottom: 2px;
    filter: drop-shadow(0 0 3px rgba(118, 255, 3, 1));
}

/* Decor Items */
.junk-decorator {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.pin-tl {
    width: 55px;
    max-width: 55px;
    transform: rotate(-12deg);
}

.pin-tl img {
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.7));
}

.paper-clip {
    width: 20px;
    height: 40px;
    border: 2px solid #aaa;
    border-radius: 10px;
    top: 50%;
    right: 5%;
    transform: rotate(45deg);
}

.button-red {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ff8a80, #c62828);
    border-radius: 50%;
    bottom: 25%;
    right: 15%;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.penny {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 35% 35%, #cd7f32, #5d4037 80%, #3e2723);
    border-radius: 50%;
    top: 70%;
    left: 80%;
    opacity: 1;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
}

.penny::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

/* Responsive adjustments */
@media (max-width: 650px) {
    .drawer-container {
        bottom: -410px;
        /* Adjusted for taller drawer */
        height: 460px;
    }

    .drawer-content {
        justify-content: center;
        padding: 10px;
    }

    .junk-item {
        margin: 5px;
        transform: scale(0.8);
        /* Scale down more on small screens */
    }

    .sales-brochure {
        width: 160px;
        height: 100px;
    }

    .junk-decorator {
        transform: scale(0.7);
        /* Scale down decor on mobile */
    }
}

/* Enhanced Hover Animations */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.drawer-handle:hover .handle-text {
    animation: shake 0.5s ease-in-out;
}