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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(64, 224, 208, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(192, 192, 192, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(135, 206, 235, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, rgba(10, 20, 40, 0.7) 0%, rgba(30, 42, 58, 0.8) 25%, rgba(44, 62, 80, 0.8) 50%, rgba(52, 73, 94, 0.8) 75%, rgba(44, 62, 80, 0.7) 100%);
    color: #ecf0f1;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

/* @tweakable background image cycling system for Icelandic landscapes */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* @tweakable background image opacity overlay - increased for visibility */
    opacity: 0.35;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* @tweakable animation duration for background cycling - 210s for 30 seconds per image */
    animation: cycleBackgrounds 210s infinite;
    /* @tweakable background image transition smoothness */
    transition: background-image 2s ease-in-out;
    /* @tweakable background image blend mode for better visibility */
    mix-blend-mode: overlay;
}

/* @tweakable keyframes for cycling through Icelandic landscape backgrounds - 30 seconds per image */
@keyframes cycleBackgrounds {
    /* @tweakable timing for glacial landscape - 30 seconds display time */
    0%, 14.28% {
        background-image: url('rowan-lamb-2wBfyJtGICU-unsplash.jpg');
    }
    /* @tweakable timing for rune stones - 30 seconds display time */
    14.29%, 28.56% {
        background-image: url('petr-sidorov-sT4NIS34OUE-unsplash.jpg');
    }
    /* @tweakable timing for icelandic glacial lagoon - 30 seconds display time */
    28.57%, 42.84% {
        background-image: url('tetiana-grypachevska-IKlZxEegf40-unsplash.jpg');
    }
    /* @tweakable timing for icelandic waterfall winter - 30 seconds display time */
    42.85%, 57.12% {
        background-image: url('robert-bye-36K5WckeU3o-unsplash.jpg');
    }
    /* @tweakable timing for rose quartz runes - 30 seconds display time */
    57.13%, 71.40% {
        background-image: url('petr-sidorov-lZJxzr6BxFk-unsplash.jpg');
    }
    /* @tweakable timing for glacial lagoon reflection - 30 seconds display time */
    71.41%, 85.68% {
        background-image: url('jeremy-bishop-h7bQ8VEZtws-unsplash.jpg');
    }
    /* @tweakable timing for glacial lake dark sky - 30 seconds display time */
    85.69%, 100% {
        background-image: url('emma-francis-vpHCfunwDrQ-unsplash.jpg');
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(192, 192, 192, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(46, 204, 113, 0.3), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(142, 68, 173, 0.3), transparent),
        radial-gradient(1px 1px at 60% 90%, rgba(192, 192, 192, 0.2), transparent);
    background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
    animation: magicalParticles 20s linear infinite;
    /* @tweakable z-index to ensure particles appear above background images */
    z-index: -1;
    /* @tweakable particle layer opacity reduced to show background images better */
    opacity: 0.6;
}

@keyframes magicalParticles {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-20px) rotate(360deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.1) 0%, rgba(149, 165, 166, 0.15) 100%),
        rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow: 
        0 0 30px rgba(192, 192, 192, 0.2),
        inset 0 0 30px rgba(127, 140, 141, 0.1);
}

header::before {
    content: '᚛ ᚑ ᚒ ᚓ ᚔ ᚕ ᚖ ᚗ ᚘ ᚙ ᚚ ᚜';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 5px 20px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.3);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #c0392b, #3498db, #2ecc71, #95a5a6, #c0392b);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 
        0 0 30px rgba(192, 57, 43, 0.7),
        0 0 60px rgba(52, 152, 219, 0.4),
        0 0 90px rgba(46, 204, 113, 0.3);
    animation: magicalGlow 3s ease-in-out infinite alternate;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2px;
}

@keyframes magicalGlow {
    0% { 
        background-position: 0% 50%;
        filter: brightness(1);
    }
    100% { 
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

header p {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #bdc3c7;
    font-style: italic;
    text-shadow: 0 0 15px rgba(189, 195, 199, 0.5);
}

/* @tweakable attribution styling for author credit */
.attribution {
    margin-top: 10px;
    text-align: center;
}

.attribution a {
    font-size: 0.85rem;
    color: #95a5a6;
    text-decoration: none;
    font-style: italic;
    opacity: 0.8;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(149, 165, 166, 0.3);
}

.attribution a:hover {
    color: #bdc3c7;
    opacity: 1;
    text-shadow: 0 0 12px rgba(189, 195, 199, 0.6);
    transform: translateY(-1px);
}

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

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

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

.primary-controls-panel {
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
}

.primary-controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.advanced-controls-section {
    margin-top: 20px;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.controls-header:hover {
    text-shadow: 0 0 15px rgba(192, 57, 43, 0.8);
}

.toggle-indicator {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #bdc3c7;
}

.toggle-indicator.rotated {
    transform: rotate(180deg);
}

.advanced-controls-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.advanced-controls-content.expanded {
    max-height: 800px;
}

.control-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px 0;
}

.control-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(192, 192, 192, 0.1);
}

.control-category h4 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

.category-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.input-section, .sequence-section, .visualization-section {
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
}

.input-section::before, .sequence-section::before, .visualization-section::before {
    content: '⟨⟩';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #c0392b;
    border: 1px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.8);
}

.sequence-section {
    min-height: 300px;
}

.visualization-section {
    min-height: 350px;
}

h2 {
    color: #c0392b;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    font-family: 'Times New Roman', serif;
    letter-spacing: 1px;
    text-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 30px rgba(192, 57, 43, 0.4);
    position: relative;
}

h2::before, h2::after {
    content: '⟦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(192, 192, 192, 0.6);
    font-size: 1.2rem;
}

h2::before {
    left: -30px;
}

h2::after {
    content: '⟧';
    right: -30px;
}

h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-family: 'Times New Roman', serif;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
    letter-spacing: 0.5px;
}

.rune-categories {
    margin-bottom: 30px;
    /* @tweakable grid layout for side-by-side rune categories */
    display: grid;
    /* @tweakable equal column sizing for rune categories */
    grid-template-columns: 1fr 1fr;
    /* @tweakable gap between rune categories */
    gap: 30px;
}

.category {
    /* @tweakable remove bottom margin when categories are side by side */
    margin-bottom: 0;
}

.rune-grid, .stave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.rune-item, .stave-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.15) 0%, rgba(149, 165, 166, 0.2) 100%),
        rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(192, 192, 192, 0.3);
    min-height: 100px;
    position: relative;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
}

.rune-item::before, .stave-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(127, 140, 141, 0.05) 0px,
            rgba(127, 140, 141, 0.05) 1px,
            transparent 1px,
            transparent 10px
        );
    border-radius: 8px;
    pointer-events: none;
}

.rune-item:hover, .stave-item:hover {
    background: 
        linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(52, 152, 219, 0.3) 100%),
        rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(46, 204, 113, 0.3),
        0 0 20px rgba(46, 204, 113, 0.2),
        inset 0 0 20px rgba(127, 140, 141, 0.1);
}

.rune-item.selected, .stave-item.selected {
    background: 
        linear-gradient(135deg, rgba(46, 204, 113, 0.4) 0%, rgba(142, 68, 173, 0.5) 100%),
        rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
    transform: scale(1.05);
    box-shadow: 
        0 0 40px rgba(46, 204, 113, 0.6),
        inset 0 0 25px rgba(46, 204, 113, 0.2);
}

.rune-symbol, .stave-symbol {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #c0392b;
    text-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 30px rgba(192, 57, 43, 0.4),
        0 0 45px rgba(192, 57, 43, 0.2);
    font-family: 'Courier New', 'Lucida Console', monospace;
    line-height: 1.2;
    text-align: center;
    white-space: pre-line;
    animation: symbolGlow 2s ease-in-out infinite alternate;
}

@keyframes symbolGlow {
    0% { 
        text-shadow: 
            0 0 15px rgba(192, 57, 43, 0.8),
            0 0 30px rgba(192, 57, 43, 0.4);
    }
    100% { 
        text-shadow: 
            0 0 20px rgba(192, 57, 43, 1),
            0 0 40px rgba(192, 57, 43, 0.6),
            0 0 60px rgba(192, 57, 43, 0.3);
    }
}

.rune-name, .stave-name {
    font-size: 0.9rem;
    text-align: center;
    color: #bdc3c7;
    font-weight: 500;
}

/* @tweakable saga templates section styling when positioned under header */
.saga-templates-section {
    margin-bottom: 30px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

/* @tweakable decorative element for saga templates section */
.saga-templates-section::before {
    content: '⟨⟩';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #c0392b;
    border: 1px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.8);
}

.saga-mode {
    /* @tweakable remove top margin when saga mode is in its own section */
    margin-top: 0;
}

.saga-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.saga-btn {
    padding: 12px 18px;
    background: 
        linear-gradient(45deg, rgba(127, 140, 141, 0.3) 0%, rgba(52, 152, 219, 0.4) 50%, rgba(46, 204, 113, 0.8) 100%),
        linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 
        0 4px 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    border: 1px solid rgba(192, 192, 192, 0.3);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.saga-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(52, 152, 219, 0.5),
        0 0 25px rgba(46, 204, 113, 0.4),
        inset 0 0 15px rgba(127, 140, 141, 0.3);
}

.saga-clear-btn {
    padding: 12px 18px;
    /* @tweakable clear button background gradient - distinct red theme */
    background: 
        linear-gradient(45deg, rgba(231, 76, 60, 0.8) 0%, rgba(192, 57, 43, 0.9) 50%, rgba(155, 89, 182, 0.8) 100%),
        linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    /* @tweakable clear button shadow effects - red/warning theme */
    box-shadow: 
        0 4px 15px rgba(231, 76, 60, 0.6),
        0 0 25px rgba(192, 57, 43, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    /* @tweakable clear button border styling */
    border: 1px solid rgba(231, 76, 60, 0.5);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    /* @tweakable clear button positioning - spans two columns in grid */
    grid-column: span 2;
    /* @tweakable clear button alignment within its grid area */
    justify-self: center;
    /* @tweakable clear button maximum width to prevent over-stretching */
    max-width: 200px;
}

.saga-clear-btn:hover {
    transform: translateY(-2px);
    /* @tweakable clear button hover shadow effects */
    box-shadow: 
        0 8px 20px rgba(231, 76, 60, 0.7),
        0 0 25px rgba(192, 57, 43, 0.5),
        inset 0 0 15px rgba(127, 140, 141, 0.3);
    /* @tweakable clear button hover background adjustment */
    background: 
        linear-gradient(45deg, rgba(231, 76, 60, 0.9) 0%, rgba(192, 57, 43, 1) 50%, rgba(155, 89, 182, 0.9) 100%),
        linear-gradient(45deg, #e74c3c, #c0392b);
}

.sequence-display {
    min-height: 120px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.1) 0%, rgba(149, 165, 166, 0.15) 100%),
        rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px dashed rgba(192, 192, 192, 0.4);
    box-shadow: inset 0 0 20px rgba(192, 192, 192, 0.1);
}

.empty-message {
    text-align: center;
    color: #bdc3c7;
    font-style: italic;
    margin-top: 40px;
}

.sequence-item {
    display: inline-block;
    margin: 8px;
    padding: 15px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.15) 0%, rgba(149, 165, 166, 0.2) 100%),
        rgba(192, 192, 192, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(192, 192, 192, 0.6);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
    vertical-align: top;
    box-shadow: 
        0 4px 15px rgba(192, 192, 192, 0.2),
        inset 0 0 15px rgba(127, 140, 141, 0.1);
}

.sequence-item:hover {
    background: 
        linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(52, 152, 219, 0.3) 100%),
        rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
    box-shadow: 
        0 6px 20px rgba(46, 204, 113, 0.3),
        0 0 20px rgba(46, 204, 113, 0.2),
        inset 0 0 20px rgba(127, 140, 141, 0.1);
}

.sequence-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: none;
    font-weight: bold;
}

.sequence-item:hover .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sequence-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
}

.control-btn.primary {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    color: white;
}

.control-btn:not(.primary) {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loop-btn.active {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

#waveform-canvas {
    width: 100%;
    height: 200px;
    background: 
        radial-gradient(ellipse at center, rgba(127, 140, 141, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(127, 140, 141, 0.2) 100%),
        rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 2px solid rgba(192, 192, 192, 0.3);
    box-shadow: 
        inset 0 0 30px rgba(192, 192, 192, 0.15),
        0 0 20px rgba(192, 192, 192, 0.1);
}

.music-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item label {
    color: #bdc3c7;
    font-weight: 500;
}

.info-item span {
    color: #c0392b;
    font-weight: bold;
}

.controls-panel {
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

.controls-panel::before {
    content: '᚛ ᚏᚒᚅᚔᚉ ᚐᚏᚉᚐᚅᚐ ᚜';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 4px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.parameter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    color: #bdc3c7;
    font-weight: 500;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: 
        radial-gradient(circle, #c0392b 0%, #3498db 50%, #95a5a6 100%),
        linear-gradient(45deg, #c0392b, #3498db);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4),
        inset 0 0 8px rgba(127, 140, 141, 0.3);
    border: 2px solid rgba(192, 192, 192, 0.6);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: 
        radial-gradient(circle, #c0392b 0%, #3498db 50%, #95a5a6 100%),
        linear-gradient(45deg, #c0392b, #3498db);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(192, 192, 192, 0.6);
    box-shadow: 
        0 0 15px rgba(192, 57, 43, 0.8),
        0 0 25px rgba(52, 152, 219, 0.4);
}

.control-group select {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.9rem;
}

.control-group select option {
    background: #1e2a3a;
    color: #ecf0f1;
}

.control-group span {
    color: #c0392b;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
}

.translation-controls {
    margin-top: 15px;
    text-align: center;
}

.translate-btn {
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.8) 0%, rgba(52, 152, 219, 0.9) 50%, rgba(155, 89, 182, 0.8) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(192, 192, 192, 0.4);
    box-shadow: 
        0 4px 15px rgba(46, 204, 113, 0.4),
        0 0 20px rgba(52, 152, 219, 0.3);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(46, 204, 113, 0.5),
        0 0 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.9) 0%, rgba(52, 152, 219, 1) 50%, rgba(155, 89, 182, 0.9) 100%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .control-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .primary-controls-grid {
        grid-template-columns: 1fr;
    }
    
    .control-categories {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* @tweakable stack rune categories vertically on mobile */
    .rune-categories {
        grid-template-columns: 1fr;
        /* @tweakable smaller gap between categories on mobile */
        gap: 20px;
    }
    
    /* @tweakable restore bottom margin for mobile stacked layout */
    .category {
        margin-bottom: 20px;
    }
    
    .category:last-child {
        margin-bottom: 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Animation keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.05);
        box-shadow: 
            0 0 30px rgba(192, 57, 43, 0.6),
            0 0 50px rgba(52, 152, 219, 0.4);
    }
    100% { transform: scale(1); }
}

.playing {
    animation: pulse 0.5s ease-in-out infinite;
    box-shadow: 
        0 0 25px rgba(192, 57, 43, 0.8),
        0 0 45px rgba(52, 152, 219, 0.5);
}

/* Tweakable value indicators */
.tweakable {
    position: relative;
}

.tweakable::after {
    content: "⚡";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.info-dropdowns-section {
    margin-bottom: 30px;
    background: 
        linear-gradient(135deg, rgba(127, 140, 141, 0.08) 0%, rgba(149, 165, 166, 0.12) 100%),
        rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 192, 192, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(127, 140, 141, 0.1),
        0 0 20px rgba(192, 192, 192, 0.1);
    position: relative;
}

.info-dropdowns-section::before {
    content: '᚛ ᚏᚒᚅᚔᚉ ᚒᚔᚖᚄᚇᚑᚋ ᚜';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0a1428 0%, #1e2a3a 100%);
    padding: 4px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #c0392b;
    border: 2px solid rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.dropdown-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dropdown-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(192, 192, 192, 0.1);
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-header:hover {
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 15px rgba(192, 57, 43, 0.8);
}

.dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

.dropdown-indicator {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #bdc3c7;
}

.dropdown-indicator.rotated {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-content.expanded {
    max-height: 800px;
    padding: 20px;
}

.dropdown-text {
    color: #ecf0f1;
    line-height: 1.6;
}

.dropdown-text h4 {
    color: #e67e22;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(230, 126, 34, 0.6);
}

.dropdown-text p {
    margin-bottom: 12px;
    color: #bdc3c7;
}

.dropdown-text ol, .dropdown-text ul {
    margin: 10px 0 15px 20px;
    color: #bdc3c7;
}

.dropdown-text li {
    margin-bottom: 8px;
}

.dropdown-text strong {
    color: #f39c12;
    text-shadow: 0 0 5px rgba(243, 156, 18, 0.4);
}

@media (max-width: 768px) {
    .dropdown-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dropdown-header h3 {
        font-size: 1rem;
    }
    
    .dropdown-content.expanded {
        max-height: 600px;
        padding: 15px;
    }
}