@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Pacifico&display=swap');

:root {
    --accent: #e91e63;
    --paper: #fff9f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: #1a0f12;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Основная текстура бумаги */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255,240,230,0.08), rgba(255,240,230,0.08)),
                url('https://i.ibb.co/KqY7Z3Y/old-paper-texture.jpg') center/cover;
    opacity: 0.9;
    z-index: -2;
    mix-blend-mode: multiply;
}

/* ====================== ЭКРАН ПАРОЛЯ ====================== */
.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #2b1a20, #1a0f12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: rgba(255,255,255,0.96);
    padding: 70px 60px;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6);
    text-align: center;
    width: 440px;
    border: 12px solid #f8b5c8;
}

/* ====================== ВЕРХНЯЯ ПАНЕЛЬ ====================== */
.editor-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 200;
    border-bottom: 3px solid #f8b5c8;
}

h1#albumTitle {
    font-family: 'Pacifico', cursive;
    font-size: 2.1rem;
    color: #c2185b;
    margin: 0;
}

.tools { display: flex; gap: 12px; }

.tool-btn {
    padding: 12px 24px;
    background: #e91e63;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ====================== АУДИОПЛЕЕР ====================== */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(249, 168, 212, 0.25);
    padding: 8px 14px;
    border-radius: 50px;
    border: 2px solid #f8b5c8;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e91e63;
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* ====================== ХОЛСТ ====================== */
.canvas {
    position: fixed;
    top: 85px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    box-shadow: inset 0 0 120px rgba(0,0,0,0.3);
    overflow: hidden;
    border-top: 28px solid #FFC0CB;
    z-index: 1;
}

.elements-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* ====================== ЭЛЕМЕНТЫ ====================== */
.photo-card, .text-element {
    position: absolute;
    cursor: move;
    z-index: 20;                    /* Выше пылинок */
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.photo-card {
    padding: 0px;
    background: #fffaf0;
    border-radius: 8px;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 10px solid white;
    border-radius: 4px;
}

.text-element {
    padding: 18px 26px;
    background: rgba(255,250,240,0.97);
    border: 4px dashed #f8b5c8;
    font-size: 1.55rem;
    color: #c2185b;
    min-width: 220px;
    border-radius: 14px;
}

/* ====================== LIGHTBOX ====================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.lightbox.show { display: flex; }

.lightbox-content img {
    max-width: 90%;
    max-height: 90vh;
    border: 12px solid white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* ====================== PARTICLES (ПЫЛИНКИ) ====================== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;           /* Важно: ниже элементов */
    opacity: 0.55;
}