:root {
    --color-bg: linear-gradient(135deg, #fff5f0 0%, #ffe4e1 50%, #fff0f5 100%);
    --color-card: rgba(255, 255, 255, 0.85);
    --color-primary: #ff9aa2;
    --color-primary-dark: #ff758c;
    --color-secondary: #ffdac1;
    --color-accent: #b5ead7;
    --color-text: #5a4a4a;
    --color-text-light: #8a7a7a;
    --shadow-soft: 0 8px 32px rgba(255, 154, 162, 0.15);
    --radius: 24px;
    --radius-sm: 16px;
}

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

html, body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.card {
    background: var(--color-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #ff758c, #ff9aa2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.emoji-big {
    font-size: 3.5rem;
    text-align: center;
    display: block;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-top: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9aa2, #ff758c);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 117, 140, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.45);
}

.btn-secondary {
    background: linear-gradient(135deg, #ffdac1, #ffb7b2);
    color: #5a4a4a;
    box-shadow: 0 4px 16px rgba(255, 183, 178, 0.35);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 183, 178, 0.45);
}

.btn-accent {
    background: linear-gradient(135deg, #b5ead7, #a2e0d1);
    color: #3a6a5a;
    box-shadow: 0 4px 16px rgba(181, 234, 215, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181, 234, 215, 0.5);
}

.option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
}

.option-card:hover {
    border-color: var(--color-primary);
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.95);
}

.option-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.option-text h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.option-text p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 154, 162, 0.2);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--color-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 154, 162, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: block;
    padding: 40px 20px;
    border: 3px dashed rgba(255, 154, 162, 0.4);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.file-label:hover {
    border-color: var(--color-primary);
    background: rgba(255, 154, 162, 0.05);
}

.file-label .file-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
}

.theme-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.theme-option {
    padding: 10px 18px;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.theme-option input {
    display: none;
}

.theme-option.warm { background: linear-gradient(135deg, #ffe4e1, #ffdac1); color: #8a5a5a; }
.theme-option.sakura { background: linear-gradient(135deg, #ffd1dc, #ffb7c5); color: #8a4a5a; }
.theme-option.ocean { background: linear-gradient(135deg, #c7ecee, #a2d9e7); color: #3a5a6a; }
.theme-option.sunset { background: linear-gradient(135deg, #ffecd2, #fcb69f); color: #8a5a3a; }
.theme-option.mint { background: linear-gradient(135deg, #d4f1d4, #b5ead7); color: #3a6a4a; }

.theme-option.active {
    border-color: var(--color-primary-dark);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.audio-player {
    width: 100%;
    margin: 20px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.audio-player audio {
    width: 100%;
    border-radius: var(--radius-sm);
}

.music-card {
    text-align: center;
    padding: 40px 24px;
}

.music-disc {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9aa2, #ffdac1, #b5ead7);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    animation: spin 8s linear infinite;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-platform-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 154, 162, 0.15);
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.diary-header {
    text-align: center;
    margin-bottom: 24px;
}

.diary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.diary-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.diary-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.diary-images img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    object-fit: cover;
}

.diary-body {
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--color-text);
}

/* Theme styles for diary view */
.diary-theme-warm { background: linear-gradient(135deg, #fff5f0, #ffe4e1); }
.diary-theme-sakura { background: linear-gradient(135deg, #fff0f3, #ffd1dc); }
.diary-theme-ocean { background: linear-gradient(135deg, #f0f8ff, #c7ecee); }
.diary-theme-sunset { background: linear-gradient(135deg, #fff8f0, #ffecd2); }
.diary-theme-mint { background: linear-gradient(135deg, #f0fff5, #d4f1d4); }

.preview-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.preview-images img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 154, 162, 0.2);
}

.admin-table th {
    font-weight: 600;
    color: var(--color-primary-dark);
    background: rgba(255, 154, 162, 0.08);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-audio { background: #ffe4e1; color: #c45a5a; }
.badge-music { background: #e1f0ff; color: #5a7ac4; }
.badge-diary { background: #e1ffe8; color: #5ac46a; }

.footer-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: auto;
    padding-top: 24px;
    opacity: 0.7;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
    color: var(--color-primary-dark);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 154, 162, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 400px) {
    .container {
        padding: 16px 14px;
    }
    .card {
        padding: 20px 16px;
    }
    .title {
        font-size: 1.4rem;
    }
}
