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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    line-height: 1.6;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

.form-section {
    background: #141414;
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.form-section.hidden {
    display: none;
}

.form-section label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.hint {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.role-btn {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 16px;
    color: #e5e5e5;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.role-btn:hover {
    border-color: #f97316;
    background: #1f1f1f;
}

.role-btn.selected {
    border-color: #f97316;
    background: #f97316;
    color: #000;
    font-weight: 600;
}

textarea {
    width: 100%;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 16px;
    color: #e5e5e5;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #f97316;
}

.char-count {
    text-align: right;
    color: #666;
    font-size: 0.85rem;
    margin-top: 8px;
}

.char-count.error {
    color: #ef4444;
}

input[type="email"] {
    width: 100%;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 16px;
    color: #e5e5e5;
    font-size: 1rem;
    margin-bottom: 15px;
}

input[type="email"]:focus {
    outline: none;
    border-color: #f97316;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group label {
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 0;
    color: #888;
}

.btn-primary {
    display: inline-block;
    background: #f97316;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: #fb923c;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #f97316;
    border: 2px solid #f97316;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f97316;
    color: #000;
}

.btn-share {
    background: #262626;
    color: #e5e5e5;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
}

.btn-share:hover {
    background: #333;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading {
    text-align: center;
}

.results-card {
    background: #141414;
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    font-size: 1.5rem;
    color: #fff;
}

.score {
    display: flex;
    align-items: baseline;
    padding: 10px 20px;
    border-radius: 8px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.score-label {
    font-size: 1.2rem;
    color: #888;
    margin-left: 4px;
}

.score-low {
    background: #7f1d1d;
    color: #fca5a5;
}

.score-medium {
    background: #78350f;
    color: #fcd34d;
}

.score-high {
    background: #14532d;
    color: #86efac;
}

.summary {
    font-size: 1.2rem;
    font-style: italic;
    color: #888;
    margin-bottom: 30px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
}

.results-section {
    margin-bottom: 25px;
}

.results-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #fff;
}

.results-section ul,
.results-section ol {
    padding-left: 20px;
}

.results-section li {
    margin-bottom: 10px;
    color: #ccc;
}

.results-section.good h3 {
    color: #86efac;
}

.results-section.roast h3 {
    color: #fca5a5;
}

.results-section.fixes h3 {
    color: #f97316;
}

.results-cta {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.results-cta h3 {
    margin-bottom: 10px;
}

.results-cta p {
    margin-bottom: 15px;
    color: #ccc;
}

.share-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #262626;
}

.share-section p {
    margin-bottom: 10px;
    color: #888;
}

.roast-another {
    text-align: center;
    margin-top: 20px;
}

.error-message {
    text-align: center;
    padding: 40px;
}

.error-message h2 {
    color: #fca5a5;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    margin-top: 60px;
    color: #666;
}

footer a {
    color: #f97316;
    text-decoration: none;
}

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

@media (max-width: 500px) {
    .role-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 1.8rem;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
