*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1e1e1e;
    margin: 0;
    padding: 0;
    color: #ffffff;
}

/* Page Container */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    background: #1e1e1e;
}

.app-wrapper {
    padding: 20px;
}

.page-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 300;
    text-align: center;
    margin: 0 0 20px 0;
}

.window {
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    border: 1px solid #3f3f3f;
}

.title-bar {
    background: #2d2d2d;
    padding: 12px 16px;
    color: #ffffff;
    font-weight: 400;
    font-size: 13px;
    border-bottom: 1px solid #3f3f3f;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-bar-icon {
    height: 20px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.title-text {
    line-height: 20px;
    font-weight: 400;
}

.menu-bar {
    background: #252525;
    padding: 0;
    border-bottom: 1px solid #3f3f3f;
    display: flex;
    gap: 0;
}

.menu-item {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 13px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 2px solid transparent;
}

.menu-item:hover {
    background: #3f3f3f;
}

.menu-item.active {
    background: #2d2d2d;
    border-bottom: 2px solid #0078d4;
    color: #0078d4;
}

.menu-item:active {
    background: #4f4f4f;
}

.container {
    background: #2d2d2d;
    padding: 20px;
    overflow: hidden;
}

.content-layout {
    display: flex;
    gap: 6px;
    align-items: stretch;
    margin-bottom: 20px;
}

.form-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.info-panel {
    flex: 0 0 480px;
    width: 480px;
    display: flex;
    flex-direction: column;
}

.group-box {
    border: 1px solid #3f3f3f;
    background: #252525;
    padding: 16px 12px 12px 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.group-box-caption {
    color: #60cdff;
    font-size: 13px;
    font-weight: 600;
    padding: 0 6px;
    margin-left: 8px;
    background: #252525;
    flex-shrink: 0;
}

.group-box-content {
    background: transparent;
    border: none;
    padding: 12px 0 0 0;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    color: #ffffff;
    flex: 1;
}

.group-box-content::-webkit-scrollbar {
    width: 12px;
}

.group-box-content::-webkit-scrollbar-track {
    background: #252525;
}

.group-box-content::-webkit-scrollbar-thumb {
    background: #5a5a5a;
    border-radius: 6px;
}

.group-box-content::-webkit-scrollbar-thumb:hover {
    background: #6a6a6a;
}

.group-box-content p {
    margin: 0 0 10px 0;
}

.group-box-content p:last-child {
    margin-bottom: 0;
}

.group-box-content strong {
    font-weight: 600;
}

.group-box-content a {
    color: #60cdff;
    text-decoration: none;
}

.group-box-content a:hover {
    text-decoration: underline;
}

.group-box-content ul,
.group-box-content ol {
    margin: 10px 0;
    padding-left: 24px;
    font-size: 13px;
}

.group-box-content li {
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 13px;
}

input[type="text"] {
    width: 100%;
    max-width: 240px;
    padding: 8px 10px;
    border: 1px solid #5a5a5a;
    font-size: 13px;
    background: #1e1e1e;
    color: #ffffff;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    transition: border-color 0.15s ease;
}

input[type="text"]:hover {
    border-color: #6a6a6a;
}

input[type="text"]:focus {
    outline: none;
    border: 2px solid #0078d4;
    padding: 7px 9px;
}

input[type="file"] {
    font-size: 13px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    padding: 4px 0;
}

input[type="file"]::file-selector-button {
    background: #3f3f3f;
    color: #ffffff;
    border: 1px solid #5a5a5a;
    padding: 6px 12px;
    cursor: pointer;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    margin-right: 10px;
}

input[type="file"]::file-selector-button:hover {
    background: #4f4f4f;
}

.button-group {
    display: inline-flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.file-button {
    text-decoration: none;
    background: #3f3f3f;
    color: #ffffff;
    border: 1px solid #5a5a5a;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    font-weight: 400;
    margin-bottom: 0;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.file-button:hover {
    background: #4f4f4f;
    border-color: #6a6a6a;
}

.file-button:active {
    background: #5a5a5a;
}

button {
    background: #0078d4;
    color: #ffffff;
    border: 1px solid #0078d4;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 400;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background-color 0.15s ease;
}

button:hover {
    background: #1a86d9;
    border-color: #1a86d9;
}

button:active {
    background: #005a9e;
    border-color: #005a9e;
}

button:focus,
.file-button:focus {
    outline: 2px solid #60cdff;
    outline-offset: 2px;
}

#fileStatus {
    margin-bottom: 16px;
    font-size: 13px;
    min-height: 18px;
}

.limit-note {
    margin-top: 6px;
    font-size: 12px;
    color: #b0b0b0;
}

.status-error {
    color: #ff6b6b;
    font-weight: 600;
}

.status-info {
    color: #60cdff;
}

#output {
    margin-top: 0;
    padding: 0;
    border: 1px solid #3f3f3f;
    background: #1e1e1e;
    max-height: 500px;
    overflow: auto;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    font-size: 13px;
}

#output::-webkit-scrollbar {
    width: 12px;
}

#output::-webkit-scrollbar-track {
    background: #1e1e1e;
}

#output::-webkit-scrollbar-thumb {
    background: #5a5a5a;
    border-radius: 6px;
}

#output::-webkit-scrollbar-thumb:hover {
    background: #6a6a6a;
}

.file-header {
    background: #252525;
    border-bottom: 1px solid #3f3f3f;
    padding: 10px 12px;
    font-weight: 600;
    color: #ffffff;
}

.message-line {
    padding: 8px 12px;
    line-height: 1.5;
    border-bottom: 1px solid #2d2d2d;
}

.message-line:last-child {
    border-bottom: none;
}

.message-empty {
    color: #b0b0b0;
    font-style: italic;
}

.unlock-notice {
    background: #3d3000;
    border-top: 2px solid #ffb900;
    color: #ffffff;
    padding: 12px;
    font-weight: 600;
}

.buddy-name {
    font-weight: 600;
    color: #b0b0b0;
}

.owner-name {
    font-weight: 600;
    color: #60cdff;
}

.timestamp {
    color: #b0b0b0;
    font-size: 12px;
}

.emoticon {
    vertical-align: middle;
    display: inline-block;
    height: 18px;
    width: auto;
}

.site-footer {
    background: #252525;
    border-top: 1px solid #3f3f3f;
    padding: 20px;
    text-align: center;
    color: #b0b0b0;
    font-size: 12px;
    line-height: 1.6;
}

.site-footer p {
    margin: 0 0 8px 0;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .page-container {
        max-width: 100%;
    }

    .app-wrapper {
        padding: 12px;
    }

    .page-title {
        font-size: 24px;
    }

    .content-layout {
        flex-direction: column;
        gap: 16px;
    }

    .info-panel {
        flex: 1;
        width: 100%;
    }

    .group-box-content {
        max-height: 240px;
    }

    .container {
        padding: 16px;
    }

    input[type="text"] {
        max-width: 100%;
    }

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

    .file-button,
    button {
        width: 100%;
    }

    #output {
        font-size: 13px;
        max-height: 400px;
    }
}
