/* ==============================================
   Zakk's Mirror - Shared Styles
   ============================================== */

/* CSS Variables - Light Theme */
:root {
    --bg: #ffffff;
    --text: #222;
    --text-meta: #666;
    --primary: #54487a;
    --code-bg: #f8f8f8;
    --success: #2e7d32;
    --hover-bg: #f5f5f5;
    --border: #eee;
}

/* CSS Variables - Dark Theme */
[data-theme="dark"] {
    --bg: #111;
    --text: #eee;
    --text-meta: #888;
    --primary: #a78bfa;
    --code-bg: #1a1a1a;
    --success: #66bb6a;
    --hover-bg: #222;
    --border: #333;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 14px;
    transition: 0.2s;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.brand:hover {
    text-decoration: none;
}

.logo {
    height: 32px;
    width: auto;
}

h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Header Actions */
.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

/* Buttons */
.btn {
    background: transparent;
    border: none;
    color: var(--text-meta);
    height: 32px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn:hover {
    color: var(--primary);
    background: var(--hover-bg);
    text-decoration: none;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg);
    padding: 5px 0;
    display: none;
    z-index: 10;
    min-width: 100px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.lang-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 8px 15px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    line-height: 1.2;
    min-height: 36px;
    cursor: pointer;
}

.dropdown-item:hover {
    color: var(--primary);
    background: var(--hover-bg);
}

/* Footer */
footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-meta);
    padding-top: 40px;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Section Headers */
h2 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-meta);
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0 0 15px 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-meta);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.info-item span {
    font-weight: 500;
    font-size: 14px;
}

/* Code Blocks */
.code-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--code-bg);
    padding: 8px 15px;
    border-radius: 6px 6px 0 0;
    font-size: 11px;
    color: var(--text-meta);
    font-family: monospace;
}

.code-block {
    background: var(--code-bg);
    padding: 20px;
    margin: 0;
    font-family: monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre;
    color: var(--text);
    border-radius: 0 0 6px 6px;
}

.copy-link {
    cursor: pointer;
    color: var(--primary);
    border: none;
    background: transparent;
    font-size: 11px;
    padding: 0;
}

.copy-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    header {
        height: auto;
        padding: 10px 0;
    }

    .actions {
        gap: 5px;
    }

    .btn {
        padding: 0 8px;
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .info-grid {
        gap: 20px;
    }
}