/**
 * style-base.css — 統一基礎樣式
 * 深色主題 + 金色重點色
 * 所有工具共用
 */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0612 0%, #1a0b2e 50%, #16213e 100%);
    color: #ddd;
    min-height: 100vh;
}

a {
    color: #ffd700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* --- Buttons --- */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.btn-outline {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #ffd700;
}

/* --- User Bar --- */
.user-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0;
    gap: 10px;
}

.user-bar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* --- Ads --- */
.ad-banner-top {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.7rem;
    pointer-events: none;
}

.ad-slot-inline {
    width: 100%;
    max-width: 320px;
    height: 50px;
    margin: 15px auto 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.7rem;
    border-radius: 6px;
}

/* --- Interstitial Ad --- */
.interstitial-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.interstitial-overlay.active {
    display: flex;
}

.interstitial-ad-box {
    width: 90%;
    max-width: 400px;
    min-height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    border-radius: 12px;
}

.interstitial-skip {
    margin-top: 20px;
    padding: 10px 30px;
    background: transparent;
    border: 1px solid #555;
    color: #888;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
}

.interstitial-skip:not(:disabled):hover {
    border-color: #ffd700;
    color: #ffd700;
}

.interstitial-skip:disabled {
    cursor: not-allowed;
}

/* --- Footer --- */
.app-footer {
    text-align: center;
    padding: 12px 20px;
    font-size: 0.75rem;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.app-footer a {
    color: #998a5e;
    text-decoration: none;
    margin: 0 8px;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ad-banner-top {
        width: 320px;
        height: 50px;
    }
}