:root {
    --emerald-velvet: #0A3D2E;
    --platinum: #D7D7D9;
    --pastel-white: #F5F0E8;
    --pastel-pink: #FADADD;
    --pastel-blue: #D4E4F7;
    --gold: #FFD700;
    --bright-gold: #FFEA00;
    --font: 'Playfair Display', serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--emerald-velvet);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    touch-action: manipulation;
}

.background-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    opacity: 0.2;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    color: var(--platinum);
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.5;
}

.datetime {
    padding: 4px 12px;
    border-radius: 6px;
}

.desktop {
    width: 100%;
    height: 100%;
    padding: 50px 20px 80px 20px;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
    z-index: 10;
    overflow: hidden;
    touch-action: none;
}

.file {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 20;
    touch-action: none;
    will-change: left, top;
    position: absolute;
}

.file.dragging {
    opacity: 0.7;
    transform: scale(1.15);
}

.file:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px rgba(250, 218, 221, 0.3));
}

.file-icon {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--pastel-white);
    transition: var(--transition);
}

.file-icon img,
.file-icon video,
.file-icon svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--pastel-white);
}

.file-icon video::-webkit-media-controls {
    display: none;
}

.folder .file-icon {
    background: linear-gradient(135deg, var(--pastel-pink), var(--pastel-blue));
}

.folder .file-icon svg {
    padding: 8px;
}

.text-icon {
    padding: 8px;
}

.file span {
    margin-top: 12px;
    font-size: 16px;
    color: var(--platinum);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.window {
    display: none;
    position: absolute;
    top: 50px;
    left: calc(50% - 400px);
    width: 800px;
    height: 600px;
    max-height: 90vh;
    background: var(--platinum);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 1000;
    animation: window-open 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: none;
}

.window-header {
    background: var(--platinum);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    cursor: move;
    touch-action: none;
}

.window-controls {
    display: flex;
    gap: 10px;
}

.window-control {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff605c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.close-icon {
    width: 8px;
    height: 8px;
}

.window-control:hover {
    transform: scale(1.3);
    filter: brightness(1.3);
}

.window-title {
    font-size: 16px;
    color: var(--emerald-velvet);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-left: 20px;
}

.window-content {
    padding: 20px;
    height: calc(100% - 50px);
    color: var(--emerald-velvet);
    font-size: 18px;
    line-height: 1.7;
    touch-action: pan-y;
    background: var(--platinum);
}

.window-content img,
.window-content video {
    max-width: 100%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 0 auto;
    display: block;
}

.window-content video::-webkit-media-controls {
    display: none;
}

.folder-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    background: var(--platinum);
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}

.folder-item:hover {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.folder-item img,
.folder-item video {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.folder-item span {
    margin-top: 8px;
    font-size: 14px;
    color: var(--emerald-velvet);
    text-align: center;
}

.call-log {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    max-height: 100%;
}

.call-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    transition: var(--transition);
}

.call-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.call-item img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 50%;
}

.call-info {
    flex: 1;
}

.call-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.call-info p {
    font-size: 14px;
    color: var(--emerald-velvet);
    opacity: 0.7;
}

.text-content {
    overflow-y: auto;
    max-height: 100%;
}

.text-content p {
    margin-bottom: 15px;
    font-size: 16px;
}

.text-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

.notes-area {
    width: 100%;
    height: 100%;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    resize: none;
    color: var(--emerald-velvet);
    font-family: var(--font);
    overflow-y: hidden;
}

.notes-area:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--pastel-blue);
}

.gallery {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
    background: var(--platinum);
}

.gallery-container {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
    width: 100%;
}

.gallery-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.gallery-item img,
.gallery-item video {
    max-width: 90%;
    max-height: 70%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--platinum);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    z-index: 1001;
    transition: var(--transition);
}

.arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.arrow.left {
    left: 15px;
}

.arrow.right {
    right: 15px;
}

.dock {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.3));
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    gap: 15px;
    box-shadow: var(--shadow);
    z-index: 50;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-item {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.dock-icon {
    width: 55px;
    height: 55px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
    border-radius: 10px;
}

.dock-item:hover {
    transform: scale(1.5) translateY(-10px);
}

.dock-item:hover .dock-tooltip {
    opacity: 1;
    transform: translateY(-10px);
}

.dock-tooltip {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--emerald-velvet);
    color: var(--platinum);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: #ff605c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes window-open {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes window-minimize {
    to {
        transform: scale(0.3);
        opacity: 0;
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .background-image img {
        max-width: 90%;
        max-height: 70%;
        opacity: 0.3;
    }

    .desktop {
        padding: 40px 15px 100px 15px;
    }

    .file-icon {
        width: 100px;
        height: 100px;
    }

    .file span {
        font-size: 14px;
    }

    .window {
        width: 90vw;
        max-height: 500px;
        left: calc(50% - 45vw);
    }

    .window-content {
        padding: 12px;
        font-size: 15px;
    }

    .text-content p {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .text-content h2 {
        font-size: 20px;
    }

    .dock {
        padding: 8px;
        gap: 12px;
    }

    .dock-icon {
        width: 45px;
        height: 45px;
    }

    .menu-bar {
        font-size: 14px;
        height: 24px;
    }

    .arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .notification {
        width: 15px;
        height: 15px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .background-image img {
        max-width: 95%;
        max-height: 60%;
        opacity: 0.4;
    }

    .window {
        max-height: 450px;
    }

    .desktop {
        padding: 30px 10px 90px 10px;
    }

    .file-icon {
        width: 80px;
        height: 80px;
    }

    .file span {
        font-size: 12px;
        padding: 4px 8px;
    }

    .window-content {
        padding: 10px;
        font-size: 14px;
    }

    .dock {
        padding: 6px;
        gap: 10px;
    }

    .dock-icon {
        width: 40px;
        height: 40px;
    }

    .menu-bar {
        font-size: 13px;
        height: 22px;
    }

    .arrow {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .window-header {
        padding: 10px 15px;
    }

    .window-title {
        font-size: 14px;
    }

    .window-control {
        width: 12px;
        height: 12px;
    }

    .close-icon {
        width: 7px;
        height: 7px;
    }

    .notification {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }

    .call-item img {
        width: 35px;
        height: 35px;
    }

    .folder-item img,
    .folder-item video {
        width: 80px;
        height: 80px;
    }

    .folder-item span {
        font-size: 12px;
    }
}