/* Art Corner - Creative Platform Styles */

/* ⚡ SKIP LINK - Accessible Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

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

body {
    font-family: 
        'Comic Sans MS',
        'Chalkboard SE',
        'Chalkboard',
        'Marker Felt',
        'Bradley Hand ITC',
        'Trebuchet MS',
        'Helvetica Neue',
        'Arial',
        sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow: hidden;
}

/* Magical Background Effects */
.magical-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 182, 193, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(173, 216, 230, 0.2) 0%, transparent 50%);
    animation: magicalFloat 15s ease-in-out infinite alternate;
}

@keyframes magicalFloat {
    from { transform: translateY(-10px) rotate(0deg); }
    to { transform: translateY(10px) rotate(3deg); }
}

.floating-art-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="20">🎨</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="15">✨</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="18">🌈</text></svg>');
    background-repeat: no-repeat;
    background-position: 
        10% 20%,
        80% 30%,
        60% 70%;
    background-size: 50px 50px, 30px 30px, 40px 40px;
    animation: floatElements 20s linear infinite;
    opacity: 0.3;
}

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

/* Screen Management */
.screen {
    /* CRITICAL FIX: Hide inactive screens completely */
    display: none;
    min-height: 100vh;
    position: relative;
    padding: 20px;
}

.screen.active {
    /* CRITICAL FIX: Show active screen in layout */
    display: flex;
    flex-direction: column;
}

/* Welcome Screen */
#welcome-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.art-title {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: rainbowText 3s ease-in-out infinite alternate;
}

@keyframes rainbowText {
    0% { color: #ff6b6b; }
    33% { color: #4ecdc4; }
    66% { color: #45b7d1; }
    100% { color: #96ceb4; }
}

.tagline {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 500;
}

.profile-section {
    margin: 30px 0;
}

.artist-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.artist-profile-card {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 15px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.artist-profile-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.new-artist-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

.new-artist-section h4 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#new-artist-name {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

#new-artist-name:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.artist-avatar-selection {
    margin: 20px 0;
}

.avatar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.avatar-btn {
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-btn:hover {
    transform: scale(1.1);
    border-color: #ff6b6b;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.avatar-btn.selected {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Buttons */
.magic-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffecd2 100%);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
    font-family: inherit;
    margin: 10px;
}

.magic-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.6);
}

.magic-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.3rem;
    padding: 18px 35px;
}

.back-btn, .nav-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ddd;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin: 5px;
}

.back-btn:hover, .nav-btn:hover {
    background: white;
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

/* Creative Hub */
#creative-hub {
    padding: 20px;
}

.hub-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.artist-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.artist-avatar {
    font-size: 3rem;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
}

.artist-details h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.art-stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: linear-gradient(135deg, #96ceb4 0%, #ffeaa7 100%);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(150, 206, 180, 0.3);
}

.hub-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 237, 234, 0.4);
}

.creative-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.option-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
}

.option-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: #ff6b6b;
}

.option-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #ffd700;
}

.option-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
}

.option-card h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.option-card p {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.option-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.option-features span {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.option-card.featured .option-features span {
    background: rgba(255, 255, 255, 0.9);
}

.hub-nav {
    text-align: center;
}

/* Canvas Screen */
#canvas-screen {
    padding: 15px;
}

.canvas-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.canvas-title h2 {
    color: #333;
    margin-bottom: 5px;
}

.artwork-name {
    color: #666;
    font-style: italic;
}

.canvas-controls, .canvas-nav {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border: none;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
}

.canvas-container {
    display: flex;
    gap: 20px;
    flex: 1;
}

.toolbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    width: 250px;
    height: fit-content;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-section {
    margin-bottom: 25px;
}

.tool-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
}

.tool-group, .action-group, .magic-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tool-btn {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    border-color: #ff6b6b;
    transform: scale(1.1);
}

.tool-btn.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 3px 10px rgba(255, 154, 158, 0.4);
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #ddd;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-swatch.active {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.custom-color-picker {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.size-slider {
    width: 100%;
    margin-bottom: 10px;
    appearance: none;
    height: 8px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 5px;
    outline: none;
}

.size-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
}

.size-display {
    text-align: center;
    display: block;
    font-weight: bold;
    color: #666;
}

.action-btn-small, .magic-btn-small {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-btn-small:hover, .magic-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(168, 237, 234, 0.4);
}

.canvas-area {
    flex: 1;
    position: relative;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#main-canvas, #effects-layer {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

#effects-layer {
    pointer-events: none;
    z-index: 2;
}

.canvas-nav {
    margin-top: 20px;
    justify-content: center;
}

/* Style Explorer */
.explorer-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.explorer-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.style-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
}

.style-card:hover {
    transform: translateY(-5px);
    border-color: #ff6b6b;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.style-preview {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.impressionist-preview {
    background: linear-gradient(45deg, #ffd89b 0%, #19547b 100%);
}

.pop-art-preview {
    background: linear-gradient(45deg, #ff0844 0%, #ffb199 50%, #00d4ff 100%);
}

.abstract-preview {
    background: conic-gradient(from 0deg, #ff006e, #fb5607, #ffbe0b, #8338ec, #3a86ff);
}

.cartoon-preview {
    background: linear-gradient(45deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
}

.pixel-preview {
    background: 
        linear-gradient(90deg, #00f5ff 0%, #00f5ff 25%, #ff073a 25%, #ff073a 50%, #39ff14 50%, #39ff14 75%, #ffd700 75%);
    background-size: 20px 20px;
}

.watercolor-preview {
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 182, 193, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(173, 216, 230, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(144, 238, 144, 0.8) 0%, transparent 50%);
}

.style-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.try-style-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.try-style-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.explorer-nav {
    text-align: center;
}

/* Music Maker */
.music-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.music-controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.audio-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.audio-btn {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 237, 234, 0.4);
}

.visualization-options {
    text-align: center;
}

.viz-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.viz-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.viz-btn:hover {
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.viz-btn.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.music-canvas-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

#music-canvas {
    display: block;
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
}

.music-nav {
    text-align: center;
}

/* Gallery */
.gallery-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ddd;
    padding: 10px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #ff6b6b;
    background: white;
}

.filter-btn.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.artwork-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.artwork-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.artwork-thumbnail {
    width: 100%;
    height: 150px;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

.artwork-info {
    padding: 15px;
}

.artwork-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.artwork-date {
    color: #666;
    font-size: 0.8rem;
}

.gallery-nav {
    text-align: center;
}

/* Collaboration */
.collab-header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.collab-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.collab-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.collab-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.collab-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#project-code {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 15px;
    margin: 15px 0;
    font-family: inherit;
    text-align: center;
}

.collab-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.collab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.collab-nav {
    text-align: center;
}

/* Creative Muse Companion */
.muse-companion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px;
    max-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #ff6b6b;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
}

.muse-companion:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

.muse-avatar {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    animation: museBounce 2s ease-in-out infinite alternate;
}

@keyframes museBounce {
    from { transform: translateY(-5px); }
    to { transform: translateY(5px); }
}

.muse-speech {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    position: relative;
}

.muse-speech::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fed6e3;
}

.muse-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.muse-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
}

.muse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 154, 158, 0.4);
}

/* Loading and Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    font-size: 4rem;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

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

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #96ceb4 0%, #ffeaa7 100%);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(150, 206, 180, 0.4);
    z-index: 1500;
    transform: translateX(400px);
    transition: all 0.5s ease;
}

.achievement-toast:not(.hidden) {
    transform: translateX(0);
}

.achievement-icon {
    font-size: 2rem;
}

.achievement-text strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.achievement-text span {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .canvas-container {
        flex-direction: column;
    }
    
    .toolbar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .tool-section {
        display: inline-block;
        margin-right: 20px;
        margin-bottom: 15px;
        vertical-align: top;
    }
}

@media (max-width: 768px) {
    .art-title {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .welcome-content {
        padding: 20px;
    }
    
    .hub-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .creative-options {
        grid-template-columns: 1fr;
    }
    
    .canvas-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .muse-companion {
        max-width: 250px;
        padding: 15px;
    }
    
    .styles-grid {
        grid-template-columns: 1fr;
    }
    
    .collab-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 10px;
    }
    
    .avatar-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .avatar-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .color-palette {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .audio-section, .viz-buttons, .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Accessibility improvements */
.screen:focus {
    outline: none;
}

button:focus,
input:focus,
.tool-btn:focus,
.color-swatch:focus {
    outline: 3px solid #ff6b6b;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .magic-btn,
    .action-btn,
    .control-btn {
        border: 2px solid #000;
    }
    
    .color-swatch {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 🔧 CRITICAL VIEWPORT POSITIONING FIXES */
/* These fixes ensure content always appears at the top of the viewport when screens change */
html, body {
    margin: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 0 !important;
}

.screen.active {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    align-self: flex-start !important;
    justify-self: center !important;
}

/* Fix for screens appearing below the viewport */
.screen {
    position: relative !important;
    top: 0 !important;
}

/* Additional viewport safety overrides */
#app {
    position: relative !important;
    top: 0 !important;
}

/* Force container positioning to prevent layout drift */
.creative-container, .canvas-container {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
}