* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom, #0a0e27 0%, #1a1a3e 50%, #2d1b4e 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    border: 1px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-3px);
}

.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator svg {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
    color: #c4b5fd;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(to bottom right, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    z-index: 10;
}

.header {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.4) 0%, rgba(88, 28, 135, 0.4) 100%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    color: #d8b4fe;
}

.main-content {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 300px;
    background: rgba(30, 27, 75, 0.4);
    backdrop-filter: blur(8px);
    border-right: 1px solid rgba(139, 92, 246, 0.2);
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 35px;
    top: 90px;
    pointer-events: none;
    color: rgba(216, 180, 254, 0.5);
}

.content-area {
    flex: 1;
    padding: 20px;
    background: rgba(17, 24, 39, 0.3);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.new-note-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-note-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

.search-box {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(88, 28, 135, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    color: white;
}

.search-box::placeholder {
    color: rgba(216, 180, 254, 0.5);
}

.search-box:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(88, 28, 135, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.notes-list {
    list-style: none;
    padding: 0;
}

.note-item {
    background: rgba(88, 28, 135, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
    background: rgba(88, 28, 135, 0.5);
}

.note-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5) 0%, rgba(99, 102, 241, 0.5) 100%);
    color: white;
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.note-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.note-preview {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
    color: rgba(216, 180, 254, 0.9);
}

.note-date {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 5px;
    color: rgba(216, 180, 254, 0.7);
}

.note-editor {
    display: none;
}

.note-editor.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.note-input {
    width: 100%;
    padding: 15px;
    background: rgba(88, 28, 135, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    color: white;
}

.note-input::placeholder {
    color: rgba(216, 180, 254, 0.5);
}

.note-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(88, 28, 135, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.note-content {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    background: rgba(88, 28, 135, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
    color: white;
}

.note-content::placeholder {
    color: rgba(216, 180, 254, 0.5);
}

.note-content:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(88, 28, 135, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.media-upload {
    background: rgba(88, 28, 135, 0.2);
    border: 2px dashed rgba(139, 92, 246, 0.5);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    color: rgba(216, 180, 254, 0.9);
}

.media-upload:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.media-upload.dragover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.file-input {
    display: none;
}

.upload-text {
    color: rgba(216, 180, 254, 0.7);
    font-size: 14px;
    margin-top: 10px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

.media-item img, .media-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.file-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-item::before {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpolyline points='13 2 13 9 20 9'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    margin-bottom: 8px;
}

.file-name {
    font-size: 12px;
    font-weight: bold;
    color: #c4b5fd;
    word-break: break-all;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

.file-info {
    font-size: 10px;
    color: #a78bfa;
    margin-top: 5px;
}

.media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 15px 8px 8px 8px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-info {
    opacity: 1;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.8) 0%, rgba(75, 85, 99, 0.8) 100%);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(216, 180, 254, 0.9);
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: white;
}

.empty-state p {
    font-size: 1.1em;
    line-height: 1.6;
    color: rgba(216, 180, 254, 0.8);
}

.sidebar::-webkit-scrollbar, .content-area::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track, .content-area::-webkit-scrollbar-track {
    background: rgba(88, 28, 135, 0.2);
}

.sidebar::-webkit-scrollbar-thumb, .content-area::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .back-button {
        top: 10px;
        left: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .back-button span {
        display: none;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(139, 92, 246, 0.2);
        max-height: 300px;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
                                }
