@font-face {
    font-family: 'Brixton';
    src: url('../fonts/Brixton/Brixton-Lead.woff2') format('woff2'),
         url('../fonts/Brixton/Brixton-Lead.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Brixton';
    src: url('../fonts/Brixton/Brixton-Wood.woff2') format('woff2'),
         url('../fonts/Brixton/Brixton-Wood.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    overflow: hidden;
}

/* Loading screen styles */
.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #DBDCD6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 1.5s ease-out;
}

.loading-content {
    text-align: center;
    color: #392418;
}

.loading-content h2 {
    font-family: 'Brixton', Arial, sans-serif;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #392418;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.box {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

#c {
    border: none !important;
    background-image: url('../textures/canvas_optimized.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.control-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    transform: translateY(-1px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn:disabled:hover {
    border-color: #dee2e6;
    transform: none;
}

.reset-btn {
    padding: 0;
}

.letter-drawer {
    width: 200px;
    background: #B9B3A7;
    /*background-image: url('../textures/palette.png');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.letter-drawer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../textures/palette.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.letter-drawer h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #392418;
    font-size: 36px;
    font-family: 'Brixton', Arial, sans-serif;
    font-weight: bold;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.letter-scroll-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #392418 #B9B3A7;
}

.letter-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.letter-scroll-container::-webkit-scrollbar-track {
    background: #B9B3A7;
    border-radius: 4px;
}

.letter-scroll-container::-webkit-scrollbar-thumb {
    background: #392418;
    border-radius: 4px;
}

.letter-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #2a1a12;
}


.letter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.data_item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
}

.data_item:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.data_item:active {
    cursor: grabbing;
}

.data_item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.link {
    position: absolute;
    bottom: 20px;
    left: 150px;
    transform: translateX(-50%);
    text-align: left;
    z-index: 10;
    padding: 10px 20px;
    border-radius: 20px;
}

.link a {
    text-decoration: none;
    color: black;
    font-family: 'Brixton', Arial, sans-serif;
    font-weight: bold;
    margin: 0 10px;
}