/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    min-height: 100vh;
}

/* Header Styles */
#header {
    background: #004494;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#logo {
    height: 50px;
}

/* Navigation Styles */
.nav-container {
    background: #004494;
    padding: 0.5rem;
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.dropdown-trigger {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    left: 0;
    border-radius: 4px;
    top: 100%;
}

.dropdown-trigger:hover .dropdown-content {
    display: block;
}

.dropdown-content .nav-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content .nav-item:hover {
    background-color: #f1f1f1;
    border-radius: 4px;
}

.dropdown-content a:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Content Container */
#content-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-section h2 {
    color: #004494;
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #004494;
}

.form-section h3 {
    color: #2c3e50;
    font-size: 20px;
    margin: 25px 0 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-section h3:first-of-type {
    border-top: none;
    padding-top: 0;
}

.form-section form {
    display: grid;
    gap: 15px;
}

.form-section label {
    display: block;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.form-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

.form-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
    min-height: 100px;
    resize: vertical;
}

.form-section input[type="text"]:focus,
.form-section textarea:focus {
    border-color: #004494;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 68, 148, 0.1);
}

.form-section textarea::placeholder {
    color: #999;
    font-size: 13px;
}

.save-btn {
    background-color: #004494;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #003371;
}

.save-btn:active {
    transform: translateY(1px);
}

/* Report Styles */
.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #004494;
    padding-bottom: 20px;
}

.report-header img {
    display: block;
    margin: 20px auto;
    max-width: 200px;
    height: auto;
}

.section {
    margin-bottom: 40px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h2 {
    color: #004494;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.field {
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.field .label {
    font-weight: 600;
    color: #2c3e50;
}

.field .value {
    color: #333;
    line-height: 1.5;
}

/* Add scrollbar styling */
.form-section {
    max-height: 800px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #004494 #f0f0f0;
}

.form-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.form-section::-webkit-scrollbar-thumb {
    background-color: #004494;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .form-section h2 {
        font-size: 20px;
    }

    .form-section h3 {
        font-size: 18px;
    }
}

.form-section h2 {
    color: #004494;
    margin-bottom: 15px;
    border-bottom: 2px solid #004494;
    padding-bottom: 5px;
}

.form-section label {
    display: block;
    margin-bottom: 10px;
    color: #333;
}

.form-section input[type="text"],
.form-section input[type="datetime-local"],
.form-section textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.form-section textarea {
    min-height: 100px;
    resize: vertical;
}

.save-btn,
.generate-report-btn {
    background-color: #004494;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
}

.save-btn:hover,
.generate-report-btn:hover {
    background-color: #003371;
}

/* Simulation Container */
#simulation-container {
    display: flex;
    padding: 20px;
    gap: 20px;
    min-height: calc(100vh - 150px);
}

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

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

#left-top, #left-bottom {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.left-image {
    width: 100%;
    height: auto;
}

#clock-container, #plant-status-container, #ics-container {
    background: white;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#clock {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.speed-selector {
    margin-top: 15px;
    text-align: center;
}

.speed-selector label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.speed-selector select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
    width: 150px;
}

.speed-selector select:hover {
    border-color: #999;
}

.speed-selector select:focus {
    outline: none;
    border-color: #004494;
    box-shadow: 0 0 3px rgba(0, 68, 148, 0.3);
}

#plant-status, #ics-messages {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

#plant-status li, #ics-messages li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

#plant-status li img, #ics-messages li img {
    width: 24px;
    height: 24px;
}

#controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

button:active {
    opacity: 0.8;
}

#start-btn { 
    background-color: #28a745;
    width: 100%;
}

#pause-btn { 
    background-color: #ffc107; 
    color: #000;
    width: 100%;
}

#end-btn { 
    background-color: #dc3545;
    width: 100%;
}

#stop-audio-btn { 
    background-color: #007bff;
    width: 100%;
}

#ics-btn { 
    background-color: #6c757d;
    width: 100%;
    margin-top: 10px;
}

/* Company Info Styles */
.company-info-container {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.info-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* Logo Upload Styles */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.company-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 2px solid #004494;
    border-radius: 8px;
    padding: 5px;
}

.logo-upload-container {
    margin-top: 1rem;
}

.file-input {
    margin-bottom: 1rem;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    #simulation-container {
        flex-direction: column;
        padding: 10px;
    }

    #left-panel, #right-panel {
        width: 100%;
    }

    #controls button {
        width: 100%;
    }

    .burger-menu {
        display: block;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #004494;
    }

    #clock {
        font-size: 1.5rem;
    }

    #plant-status, #ics-messages {
        max-height: 150px;
    }

    .company-info-container {
        width: 95%;
        padding: 1rem;
    }
}
