:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: blobify 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #4f46e5;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: #7c3aed;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #2563eb;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes blobify {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Container & Header */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-top {
    position: absolute;
    top: -1.5rem;
    right: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.user-name {
    color: var(--text-main);
    font-weight: 600;
}

header h1 {
    font-size: 3rem;
    font-weight: 600;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-weight: 300;
}

/* Input Section */
.input-section {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.input-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.input-glass:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

textarea {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    width: 100%;
}

textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

#add-btn {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

#add-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

#add-btn:active {
    transform: scale(0.98);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.glass-btn.secondary {
    font-size: 0.9rem;
    opacity: 0.8;
}

.glass-btn.secondary:hover {
    opacity: 1;
}

/* Memos Grid */
.memos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.memo-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    animation: fadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.memo-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    white-space: pre-wrap;
    margin-bottom: 2rem;
}

.memo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.memo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.memo-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.memo-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .memos-grid {
        grid-template-columns: 1fr;
    }
}