/* Layout adjustments to match the screenshot */
body {
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    max-width: 100%; /* Ensure body is full width */
}

#animationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* First .app-container rule: Flexbox properties and general box model */
.app-container {
    position: relative;
    z-index: 1;
    display: flex; /* Restored flex, though grid below will override for layout */
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    /* Removed grid properties from this rule block */
}

/* Second .app-container rule: Grid layout properties */
.app-container {
    display: grid;
    /* Adjusted for a 3-column layout: Left content, Empty middle, Right content */
    grid-template-columns: auto 1fr auto; 
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "controls_area empty_middle_area uploader_area"
        "audio_area    empty_middle_area uploader_area";
    gap: 20px; /* This gap will apply between all columns and rows */
    width: 100%; /* Make app-container full width */
    max-width: none; /* Override max-width from app-layout.css */
    margin: 0; /* Override margin from app-layout.css */
}

.control-panel {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    grid-area: controls_area; /* Updated grid area */
}

.control-panel button {
    background-color: #2c2c2c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.control-panel button:hover {
    background-color: #3a3a3a;
}

.mic-button {
    background-color: #4CAF50 !important;
}

.audio-visualizer {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    grid-area: audio_area; /* Updated grid area */
}

.volume-meter {
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.level-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #4CAF50, #2196F3);
    transition: width 0.1s linear;
}

/* 
   Grid area assignments:
   - .control-panel has grid-area: controls_area;
   - .audio-visualizer has grid-area: audio_area;
   - .uploader-tabs-container needs grid-area: uploader_area; (updated below)
*/

.uploader-tabs-container {
    grid-area: uploader_area; /* Updated grid-area assignment */
    /* Note: Child selectors for #selectFiles were here, moved to be top-level */
}

/* For the upload buttons - moved to be top-level rules */
#selectFiles, #selectBgFiles {
    padding: 12px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

#selectFiles:hover, #selectBgFiles:hover {
    background-color: #45a049;
}