/* Base styling */
:root {
    --animation-speed: 1s;
    --particle-color: rgba(255, 255, 255, 0.5);
    --accent-color: #ffffff;
    --primary-bg: #000000;
    --secondary-bg: #111111;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--primary-bg);
    color: #fff;
    line-height: 1.5;
    transition: background-color 0.3s ease;
}

/* Font styling */
.font-geist-mono {
    font-family: 'Noto Serif SC', serif;
    letter-spacing: -0.02em;
}

/* Range input styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 4px;
    background: #4b5563;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Poetry Wall Styling */
.poem-card {
    background-color: rgba(23, 23, 23, 0.7);
    border: 1px solid rgba(55, 55, 55, 0.5);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform var(--animation-speed) ease, box-shadow var(--animation-speed) ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.poem-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
    opacity: 0.6;
}

.poem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(75, 75, 75, 0.7);
}

.poem-modern {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
}

.poem-classical {
    font-family: 'Noto Serif SC', serif;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 280px;
    line-height: 1.8;
}

.poem-haiku {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    text-align: center;
}

.poem-sonnet {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
}

/* Animation styles */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.8s forwards;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Particle styles */
.particle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--particle-color);
    pointer-events: none;
    opacity: 0.6;
}

/* Theme colors */
.theme-default {
    --accent-color: #ffffff;
    --particle-color: rgba(255, 255, 255, 0.5);
}

.theme-ocean {
    --accent-color: #38bdf8;
    --particle-color: rgba(56, 189, 248, 0.5);
}

.theme-sunset {
    --accent-color: #fb923c;
    --particle-color: rgba(251, 146, 60, 0.5);
}

.theme-forest {
    --accent-color: #4ade80;
    --particle-color: rgba(74, 222, 128, 0.5);
}

.theme-cosmic {
    --accent-color: #a78bfa;
    --particle-color: rgba(167, 139, 250, 0.5);
}

/* Expanded view styling */
#expanded-view {
    backdrop-filter: blur(5px);
}

#expanded-visual {
    transition: all 0.5s ease;
}

.visual-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.visual-particles .particle {
    animation: floatVisual 8s ease-in-out infinite;
}

@keyframes floatVisual {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -15px);
    }
    50% {
        transform: translate(20px, 0);
    }
    75% {
        transform: translate(10px, 15px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Style variants for the expanded view */
.visual-ocean {
    background: linear-gradient(to bottom, #0c4a6e, #0284c7);
}

.visual-sunset {
    background: linear-gradient(to bottom, #7c2d12, #c2410c);
}

.visual-forest {
    background: linear-gradient(to bottom, #14532d, #15803d);
}

.visual-cosmic {
    background: linear-gradient(to bottom, #4c1d95, #7e22ce);
}

.visual-default {
    background: linear-gradient(to bottom, #1e293b, #334155);
}

/* Poem style-specific expanded view content */
.expanded-modern {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
}

.expanded-classical {
    font-family: 'Noto Serif SC', serif;
    line-height: 2;
    text-align: center;
}

.expanded-haiku {
    font-family: 'Inter', sans-serif;
    line-height: 2;
    text-align: center;
}

.expanded-sonnet {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
}

/* Animation speed classes */
.speed-slow {
    --animation-speed: 1.5s;
}

.speed-medium {
    --animation-speed: 1s;
}

.speed-fast {
    --animation-speed: 0.5s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .poem-classical {
        writing-mode: horizontal-tb;
        height: auto;
        text-align: center;
    }
}

/* Add some subtle shadow to the poem content for better readability */
.poem-content div {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced focus states for accessibility */
button:focus, input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}
