* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    max-width: 700px;
    width: 100%;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-link {
    text-decoration: none;
    display: block;
}

.subtitle {
    text-align: center;
    color: #888;
    margin: 8px 0 32px;
    font-size: 1rem;
}

.input-group {
    display: flex;
    gap: 12px;
}

#phrase-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #333;
    border-radius: 12px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#phrase-input:focus {
    border-color: #a78bfa;
}

#submit-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

#submit-btn:hover {
    opacity: 0.9;
}

#submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Progress */
#progress-section {
    margin-top: 32px;
    text-align: center;
}

.progress-bar {
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    border-radius: 2px;
    animation: progress-animation 8s ease-out forwards;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 95%; }
}

.progress-text {
    color: #888;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Error */
.error-text {
    color: #f87171;
    text-align: center;
    margin-top: 24px;
    padding: 16px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #7f1d1d;
}

/* Tabs */
#results-section {
    margin-top: 32px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.tabs {
    display: flex;
    gap: 4px;
    padding-bottom: 0;
}

#share-btn {
    padding: 8px 16px;
    border: 1px solid #a78bfa;
    border-radius: 8px;
    background: transparent;
    color: #a78bfa;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#share-btn:hover {
    background: #a78bfa;
    color: #0f0f0f;
}

.tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #e0e0e0;
}

.tab.active {
    color: #e0e0e0;
    border-bottom-color: #a78bfa;
}

/* Tab content */
.tab-content {
    padding: 24px 0;
}

.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a78bfa;
    margin-bottom: 12px;
    font-weight: 600;
}

.description {
    line-height: 1.7;
    color: #ccc;
}

.phrases-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phrases-list li {
    padding: 12px 16px;
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 3px solid #a78bfa;
    line-height: 1.5;
}

.story-block {
    margin-bottom: 16px;
}

.story-header {
    font-weight: 600;
    color: #f472b6;
    margin-bottom: 6px;
}

.story-content {
    line-height: 1.7;
    color: #ccc;
}

/* Footer */
.footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #333;
    text-align: center;
}

.footer a {
    color: #a78bfa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer a:hover {
    color: #f472b6;
}
