/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace, Georgia, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #2a2a2a;
    color: #d1d1d1;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: #1f1f1f;
    border-bottom: 2px solid #444;
    padding: 20px 0;
    box-shadow: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.logo {
    font-size: 28px;
    color: #aaa;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.tagline {
    font-size: 12px;
    color: #777;
    letter-spacing: 1px;
}

/* Announcement Banner */
.announcement-banner {
    background: #3a4a3a;
    border-bottom: 1px solid #4a5a4a;
    padding: 15px 0;
    position: relative;
}

.announcement-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #7dd87d;
    font-size: 13px;
}

.announcement-close {
    background: none;
    border: none;
    color: #7dd87d;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.2s;
}

.announcement-close:hover {
    color: #aaa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.hero {
    display: none;
}

/* Cards */
.card {
    background: #333;
    border-radius: 2px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.card h3 {
    color: #aaa;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #444;
    padding-bottom: 12px;
    letter-spacing: 1px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #aaa;
    font-size: 13px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 2px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
    background: #2a2a2a;
    color: #ccc;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #777;
    box-shadow: 0 0 0 2px rgba(119, 119, 119, 0.1);
    background: #313131;
}

.site-url {
    display: flex;
    align-items: center;
    border: 1px solid #555;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.2s;
    background: #2a2a2a;
}

.site-url input {
    border: none;
    flex: 1;
    margin: 0;
    background: #2a2a2a;
    color: #ccc;
    padding: 8px 12px;
}

.site-url input:focus {
    box-shadow: none;
    border-color: transparent;
}

.site-url:has(input:focus) {
    border-color: #777;
    box-shadow: 0 0 0 2px rgba(119, 119, 119, 0.1);
}

.domain {
    background: #444;
    padding: 8px 12px;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    border-right: 1px solid #555;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

textarea {
    min-height: 250px;
    resize: vertical;
    font-size: 12px;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border: 1px solid #555;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #444;
    color: #aaa;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.5px;
}

.btn:hover {
    background: #555;
    border-color: #777;
    color: #ddd;
}

.btn-primary {
    background: #555;
    color: #ddd;
    border-color: #777;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #666;
    border-color: #888;
    color: #fff;
}

.btn-secondary {
    background: #444;
    border: 1px solid #555;
    padding: 8px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.btn-secondary:hover {
    background: #555;
    border-color: #777;
    color: #ddd;
}

.btn-danger {
    background: #5a3a3a;
    color: #d9a3a3;
    border-color: #6b4444;
    margin-right: 8px;
}

.btn-danger:hover {
    background: #6b4444;
    border-color: #7d5555;
    color: #e8b4b4;
}

.template-btn {
    background: #444;
    border: 1px solid #555;
    padding: 10px 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    color: #aaa;
    cursor: pointer;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.template-btn:hover {
    background: #555;
    border-color: #777;
    color: #ddd;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

/* Sites Grid */
.sites-grid {
    display: grid;
    gap: 12px;
}

.site-card {
    background: #444;
    border: 1px solid #555;
    border-radius: 2px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.site-card:hover {
    background: #4a4a4a;
    border-color: #666;
}

.site-card h4 {
    color: #ccc;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    word-break: break-word;
}

.site-card p {
    color: #888;
    font-size: 12px;
    margin-bottom: 10px;
    display: none;
}

.site-card .site-url-display {
    background: #3a3a3a;
    padding: 8px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #aaa;
    word-break: break-all;
    margin-bottom: 8px;
    border: 1px solid #555;
}

.site-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.site-actions button {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    font-size: 12px;
}

#publishMessage {
    margin-top: 15px;
    padding: 12px;
    border-radius: 2px;
    display: none;
    font-size: 13px;
    border: 1px solid;
}

#publishMessage.success {
    display: block;
    background: #3a4a3a;
    color: #7dd87d;
    border-color: #4a5a4a;
}

#publishMessage.error {
    display: block;
    background: #4a3a3a;
    color: #d97d7d;
    border-color: #5a4a4a;
}

#previewUrl {
    color: #aaa;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 20px;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #333;
    border: 1px solid #555;
    border-radius: 2px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    float: right;
    transition: color 0.2s;
}

.close:hover {
    color: #aaa;
}

.modal-body {
    padding: 20px;
}

.modal-body button {
    margin-bottom: 12px;
    margin-right: 8px;
}

.site-textarea {
    width: 100%;
    min-height: 350px !important;
    margin-bottom: 15px;
}

/* Footer */
footer {
    text-align: center;
    color: #777;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #444;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }

    .site-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-actions {
        width: 100%;
        margin-top: 12px;
    }

    .site-actions .btn {
        flex: 1;
    }
}

/* File Editor Styles */
.editor-container {
    border: 2px solid #444;
    background: #1f1f1f;
}

.file-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #444;
    background: #1f1f1f;
}

.file-tab {
    flex: 1;
    padding: 12px;
    background: #2a2a2a;
    color: #777;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: Courier New, monospace;
    border-right: 1px solid #444;
    transition: all 0.2s;
}

.file-tab:last-child {
    border-right: none;
}

.file-tab:hover {
    background: #333;
    color: #aaa;
}

.file-tab.active {
    background: #1f1f1f;
    color: #aaa;
    border-bottom: 2px solid #555;
    margin-bottom: -2px;
}

.file-editor {
    padding: 12px;
}

.file-editor label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    font-weight: bold;
}

.code-editor {
    height: 250px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.5;
}

.modal-file-tab {
    font-size: 13px;
    padding: 10px;
}

.site-textarea {
    height: 400px;
}

/* Sites Tabs */
.sites-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #444;
    background: #1f1f1f;
    margin: 0 -20px;
    padding: 0 20px;
}

.sites-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    color: #777;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: Courier New, monospace;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.sites-tab:hover {
    color: #aaa;
}

.sites-tab.active {
    color: #aaa;
    border-bottom-color: #555;
}

.sites-tab-content {
    display: none;
    animation: fadeIn 0.2s ease-in;
}

.sites-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
