body {
    margin: 0;
    font-family: 'Roboto Mono', monospace;
    background-color: #0d1117;
    color: #e6edf3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.container {
    background-color: #161b22;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.2), 0 0 50px rgba(0, 255, 255, 0.1);
    padding: 35px 45px;
    width: 100%;
    max-width: 900px;
    animation: fadeIn 1s ease-out;
    border: 1px solid rgba(0, 255, 255, 0.3);
    flex-grow: 1;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2 {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    margin-bottom: 30px;
}

h1 .highlight {
    color: #00ff80;
    text-shadow: 0 0 10px #00ff80, 0 0 20px #00ff80;
}

.sub-title {
    display: block;
    font-size: 0.6em;
    color: #a3b3c3;
    margin-top: 5px;
    text-shadow: none;
}

.sub-title a {
    color: #00ffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sub-title a:hover {
    color: #00ff80;
}

.personal-callsign-section {
    background-color: #1f252d;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.personal-info-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.personal-info-group label {
    font-size: 1.1em;
    color: #00ffff;
    margin-bottom: 15px;
    display: block;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    text-align: center;
}

.personal-info-group input {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #00ff80;
    border-radius: 6px;
    background-color: #0d1117;
    color: #e6edf3;
    font-size: 1.2em;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.personal-info-group input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.input-section, .log-section {
    background-color: #1f252d;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

label {
    margin-bottom: 8px;
    color: #a3b3c3;
    font-size: 0.95em;
    font-weight: bold;
    width: 100%;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
select {
    width: calc(100%);
    padding: 12px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border: 1px solid #00ffff;
    border-radius: 6px;
    background-color: #0d1117;
    color: #e6edf3;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
select:focus {
    outline: none;
    border-color: #00ff80;
    box-shadow: 0 0 10px rgba(0, 255, 128, 0.5);
}

select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2300ffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.rst-group {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.rst-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rst-input label {
    text-align: center;
    width: 100%;
}

.rst-input input {
    width: calc(100% - 24px);
    max-width: 150px;
}

.primary-button {
    background-color: #00ffff;
    color: #0d1117;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    text-align: center;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.primary-button:hover {
    background-color: #00ff80;
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.6);
    transform: translateY(-2px);
}

.log-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.log-actions .primary-button,
.log-actions .custom-file-upload {
    width: 100%;
    margin-top: 0;
    height: auto;
    padding: 15px 25px;
}

.custom-file-upload {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: normal;
}

input[type="file"] {
    display: none;
}

#logList {
    list-style: none;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    background-color: #0d1117;
}

#logList li {
    background-color: #1f252d;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#logList li:hover {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.log-entry-info {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-right: 10px;
    align-items: center;
}

.log-entry-info span strong {
    color: #00ffff;
}

.log-entry-info span {
    font-size: 0.9em;
    color: #e6edf3;
}

.log-entry-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
    min-width: 120px;
    justify-content: flex-end;
}

.log-entry-actions button {
    padding: 8px 12px;
    font-size: 0.85em;
    border-radius: 5px;
    margin-top: 0;
    width: auto;
    box-shadow: none;
    display: inline-block;
    line-height: normal;
    min-width: 55px;
    text-align: center;
    transition: all 0.3s ease;
}

.log-entry-actions .edit-button {
    background-color: #007bff;
    color: white;
}

.log-entry-actions .edit-button:hover {
    background-color: #0056b3;
}

.log-entry-actions .delete-button {
    background-color: #6c757d;
    color: white;
}

.log-entry-actions .delete-button:hover {
    background-color: #5a6268;
}

#logList li.editing .log-entry-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: calc(100% - 120px);
}

#logList li.editing .log-entry-info label {
    flex: 1 1 calc(50% - 10px);
    margin-bottom: 0;
}

#logList li.editing .log-entry-info label input,
#logList li.editing .log-entry-info label select {
    width: 100%;
    background-color: #0d1117;
    border: 1px solid #00ff80;
    color: #e6edf3;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.9em;
    box-sizing: border-box;
    margin-top: 5px;
}

#logList li.editing .log-entry-info label input[type="datetime-local"] {
    flex: 1 1 100%;
}

#logList li.editing .log-entry-info span {
    display: none;
}

#logList li.editing .log-entry-actions .edit-button {
    background-color: #28a745;
}

#logList li.editing .log-entry-actions .edit-button:hover {
    background-color: #218838;
}

#logList::-webkit-scrollbar {
    width: 10px;
}

#logList::-webkit-scrollbar-track {
    background: #161b22;
    border-radius: 10px;
}

#logList::-webkit-scrollbar-thumb {
    background-color: #00ffff;
    border-radius: 10px;
    border: 2px solid #161b22;
}

#logList::-webkit-scrollbar-thumb:hover {
    background-color: #00ff80;
}

@media (max-width: 768px) {
    .container {
        padding: 25px 30px;
        margin-bottom: 20px;
    }

    h1, h2 {
        font-size: 1.8em;
    }

    .personal-callsign-section {
        grid-template-columns: 1fr;
    }

    .personal-info-group input {
        font-size: 1em;
    }

    .log-actions {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
    }

    .log-actions .primary-button,
    .log-actions .custom-file-upload {
        width: 100%;
    }

    #logList li {
        flex-direction: column;
        align-items: flex-start;
    }

    .log-entry-info {
        grid-template-columns: 1fr;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .log-entry-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0;
    }

    #logList li.editing .log-entry-info {
        width: 100%;
    }

    #logList li.editing .log-entry-info label {
        flex: 1 1 100%;
    }

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

    .rst-input input {
        max-width: 100%;
    }

    footer {
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 20px;
    }

    h1, h2 {
        font-size: 1.5em;
    }

    .log-entry-actions button {
        padding: 6px 10px;
        font-size: 0.8em;
        min-width: 45px;
    }
}

footer {
    text-align: center;
    font-size: 0.9rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    color: #a3b3c3;
    width: 100%;
    max-width: 900px;
    opacity: 0.8;
}