:root {
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-main: #ffffff;
    --text-sub: #a0a0a0;
    --accent-gold: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Serif KR', serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px; /* Mobile optimized width */
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    margin-top: 40px;
    animation: fadeIn 1s ease-out;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--accent-gold);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-sub);
    font-size: 14px;
}

.card {
    background: var(--card-bg);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--accent-gold);
}

button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#check-btn {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

#check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
}

.hidden {
    display: none;
}

/* Loading Animation */
#loading-section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Section */
.result-header {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 20px;
}

#result-name {
    color: var(--accent-gold);
    font-weight: bold;
}

.keyword-box {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--accent-gold);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

#result-keyword {
    font-size: 36px;
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-glow);
}

.fortune-text {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 30px;
    white-space: pre-line;
}

.ad-placeholder {
    background: #222;
    border: 1px dashed #444;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    color: white;
}

.share-btn.kakao {
    background: #FEE500;
    color: #000000;
}

.share-btn.twitter {
    background: #000000;
    border: 1px solid #333;
}

.retry-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    margin-top: 10px;
}

footer {
    color: #444;
    font-size: 12px;
    margin-top: auto;
    padding-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
