:root {
    /* Light theme variables */
    --bg-color: #f5f5f5;
    --text-color: #333;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --button-bg: #ffffff;
    --button-hover: #f0f0f0;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --header-bg: #2d2d2d;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --button-bg: #3d3d3d;
    --button-hover: #4d4d4d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    height: 100vh;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Menu Bar Styles */
.menu-bar {
    background-color: var(--header-bg);
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-left img {
    width: 32px;
    height: 32px;
}

.menu-left h1 {
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
}

.menu-center {
    flex: 1;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

#iesFileInput {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.file-upload-button:hover {
    background-color: var(--button-hover);
    border-color: var(--text-color);
}

.file-upload-button:active {
    transform: translateY(1px);
}

.upload-icon {
    transition: transform 0.2s ease;
}

.file-upload-button:hover .upload-icon {
    transform: translateY(-1px);
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Button Styles */
.menu-bar button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-bar button:hover {
    background-color: var(--button-hover);
}

#theme-toggle {
    padding: 0.4rem;
    border-radius: 50%;
}

/* Main Content */
main {
    flex: 1;
    overflow: hidden;
    padding: 0.5rem;
}

#viewer-section {
    height: 100%;
}

#scene-container {
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: 4px;
    overflow: hidden;
}

#scene-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Dialog Styles */
dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    background-color: var(--card-bg);
    color: var(--text-color);
    max-width: 500px;
    width: 90%;
}

.dialog-content {
    padding: 1.5rem;
}

dialog h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

dialog p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

dialog a {
    color: #0066cc;
    text-decoration: none;
}

[data-theme="dark"] dialog a {
    color: #66b3ff;
}

#close-dialog {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--text-color);
    cursor: pointer;
}

#close-dialog:hover {
    background-color: var(--button-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-bar {
        padding: 0.3rem 0.5rem;
    }

    .menu-left h1 {
        font-size: 1rem;
    }

    .menu-right button {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }

    #theme-toggle {
        padding: 0.3rem;
    }

    .file-upload-button {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .upload-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .menu-left h1 {
        display: none;
    }
}

/* Tab Container */
.tab-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tab-buttons {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-button:hover {
    background-color: var(--button-hover);
}

.tab-button.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.tab-content {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.tab-panel {
    display: none;
    height: 100%;
    padding: 1rem;
}

.tab-panel.active {
    display: block;
}

/* Polar Diagram */
.polar-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

#polar-canvas {
    flex: 1;
    width: 100%;
    min-height: 400px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.polar-controls {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.polar-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.polar-controls input[type="range"] {
    flex: 1;
    margin: 0 0.5rem;
}

#angle-display {
    min-width: 3rem;
    text-align: right;
    font-weight: 600;
}

/* Placeholder Content */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-color);
}

.placeholder-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.placeholder-content p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    opacity: 0.8;
}

/* Scene Render */
.irradiance-scene-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#irradiance-scene-render-canvas {
    flex: 1;
    width: 100%;
    min-height: 300px;
    max-height: 70vh;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Override Three.js canvas styling */
.irradiance-scene-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 70vh !important;
}

.irradiance-controls {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.irradiance-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.irradiance-controls input[type="range"] {
    flex: 1;
    margin: 0 0.5rem;
}

.irradiance-controls span {
    min-width: 3rem;
    text-align: right;
    font-weight: 600;
} 