@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

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

body {
    font-family: 'Comic Sans MS', 'Comic Neue', cursive;
    background: linear-gradient(135deg, #5A189A 0%, #240046 100%);
    background-attachment: fixed;
    color: #E0AAFF;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(157, 78, 221, 0.1) 35px, rgba(157, 78, 221, 0.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(199, 125, 255, 0.1) 35px, rgba(199, 125, 255, 0.1) 70px);
    pointer-events: none;
    z-index: 0;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.sparkle {
    position: absolute;
    font-size: 24px;
    animation: sparkleFloat 3s infinite ease-in-out;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 1; }
}

.app-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #9D4EDD, #C77DFF, #FF006E, #7209B7);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    border-radius: 30px;
    border: 5px solid #E0AAFF;
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.8), 0 0 80px rgba(255, 0, 110, 0.4);
    margin-bottom: 30px;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.swirl {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px dashed #E0AAFF;
    animation: rotate 4s linear infinite;
}

.swirl-tl { top: -20px; left: -20px; }
.swirl-tr { top: -20px; right: -20px; animation-direction: reverse; }

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

.title {
    font-size: 3em;
    color: #FFFFFF;
    text-shadow: 
        0 0 10px #9D4EDD,
        0 0 20px #C77DFF,
        0 0 30px #FF006E,
        3px 3px 0 #7209B7;
    margin-bottom: 15px;
    animation: titlePulse 2s ease-in-out infinite;
}

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

.subtitle {
    font-size: 1.4em;
    color: #E0AAFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}

.diary-section {
    background: rgba(90, 24, 154, 0.4);
    border: 4px solid #9D4EDD;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.5);
}

.date-picker {
    margin-bottom: 25px;
    text-align: center;
}

.date-label {
    display: block;
    font-size: 1.3em;
    color: #C77DFF;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.date-input {
    padding: 12px 20px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #7209B7, #9D4EDD);
    color: #E0AAFF;
    border: 3px solid #C77DFF;
    border-radius: 15px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.6);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1) hue-rotate(270deg);
}

.entry-editor {
    margin-bottom: 25px;
}

.diary-textarea {
    width: 100%;
    padding: 20px;
    font-size: 1.1em;
    font-family: 'Comic Sans MS', cursive;
    background: rgba(36, 0, 70, 0.6);
    background-image: repeating-linear-gradient(transparent, transparent 31px, #9D4EDD 31px, #9D4EDD 32px);
    color: #E0AAFF;
    border: 4px solid #7209B7;
    border-radius: 15px;
    resize: vertical;
    line-height: 32px;
    box-shadow: inset 0 0 20px rgba(157, 78, 221, 0.3);
}

.diary-textarea::placeholder {
    color: #C77DFF;
}

.button-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.purple-button {
    flex: 1;
    padding: 15px 30px;
    font-size: 1.2em;
    font-family: inherit;
    font-weight: bold;
    background: linear-gradient(135deg, #9D4EDD, #C77DFF);
    color: #FFFFFF;
    border: 3px solid #E0AAFF;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.7);
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.purple-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(157, 78, 221, 1);
}

.purple-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin360 {
    animation: spin360 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce {
    animation: bounce 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wobble {
    animation: wobble 2.5s ease-in-out;
}

.pulse {
    animation: pulse 2.5s ease-in-out;
}

.slide {
    animation: slide 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes spin360 {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(720deg) scale(1.3); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-50px); }
    50% { transform: translateY(0) scale(1.2); }
    75% { transform: translateY(-25px); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
    75% { transform: rotate(-10deg); }
}

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

@keyframes slide {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(200px); }
    50% { transform: translateX(-200px) rotate(360deg); }
    75% { transform: translateX(100px); }
}

.entries-title {
    color: #C77DFF;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.entries-list {
    display: grid;
    gap: 15px;
}

.entry-card {
    background: rgba(114, 9, 183, 0.4);
    border: 3px solid #9D4EDD;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

.entry-card:hover {
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.8);
}

.entry-date {
    color: #FF006E;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.entry-preview {
    color: #E0AAFF;
    line-height: 1.4;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: rgba(90, 24, 154, 0.5);
    border: 4px solid #9D4EDD;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.widget h3 {
    color: #C77DFF;
    font-size: 1.3em;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.profile-pic {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #9D4EDD, #7209B7);
    border: 3px solid #E0AAFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.7);
}

.bio {
    color: #E0AAFF;
    line-height: 1.5;
    text-align: center;
}

.mood-display {
    font-size: 4em;
    text-align: center;
    animation: moodBounce 1s ease-in-out infinite;
}

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

.music-player {
    background: rgba(36, 0, 70, 0.6);
    border: 2px solid #7209B7;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #C77DFF;
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(157, 78, 221, 0.5); }
    50% { box-shadow: 0 0 25px rgba(157, 78, 221, 1); }
}

.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-tag {
    background: linear-gradient(135deg, #7209B7, #9D4EDD);
    color: #E0AAFF;
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid #C77DFF;
    font-size: 0.9em;
}

.metrics div {
    color: #E0AAFF;
    margin-bottom: 8px;
    text-align: center;
}

.app-footer {
    background: rgba(90, 24, 154, 0.6);
    border: 4px solid #9D4EDD;
    border-radius: 25px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.6);
}

.footer-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, #9D4EDD, #C77DFF, #FF006E, #9D4EDD, transparent);
    margin-bottom: 15px;
    animation: glitterSlide 3s linear infinite;
}

@keyframes glitterSlide {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.footer-link {
    color: #FF006E;
    text-decoration: none;
    font-weight: bold;
}

.footer-link:hover {
    text-shadow: 0 0 10px #FF006E;
}

.footer-tagline {
    color: #C77DFF;
    margin: 10px 0;
    font-style: italic;
}

.visitor-count {
    color: #E0AAFF;
    font-size: 0.9em;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .button-row {
        flex-direction: column;
    }
    
    .title {
        font-size: 1.5em;
    }
}