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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    min-height: 400px;
}

.input-section {
    margin-bottom: 30px;
}

.form-group {
    max-width: 600px;
    margin: 0 auto;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

#ticker {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-transform: uppercase;
    transition: border-color 0.3s;
}

#ticker:focus {
    outline: none;
    border-color: #667eea;
}

#generateBtn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#generateBtn:active {
    transform: translateY(0);
}

#generateBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.helper-text {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
}

.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingText {
    color: #666;
    font-size: 1.1em;
}

.error-section {
    padding: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 10px;
    margin-bottom: 20px;
}

.error-message {
    color: #c00;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.error-icon {
    font-size: 1.5em;
}

.results-section {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

#resultsTitle {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.results-meta {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.source-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.source-link a:hover {
    text-decoration: underline;
}

.bits-section {
    margin-bottom: 40px;
}

.bits-section h3 {
    color: #444;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bits-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bit-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
}

.bit-item:hover {
    background: #f0f1f3;
    transform: translateX(5px);
}

.bit-text {
    color: #333;
    line-height: 1.6;
    font-size: 1.05em;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 1px solid #ddd;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    color: #666;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.copy-btn.copied {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapsible-header:hover {
    color: #667eea;
}

.toggle-icon {
    transition: transform 0.3s;
}

.collapsible-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    margin-top: 20px;
}

.facts-grid {
    display: grid;
    gap: 15px;
}

.fact-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #999;
}

.fact-item.high-importance {
    border-left-color: #ff6b6b;
}

.fact-item.medium-importance {
    border-left-color: #ffd93d;
}

.fact-item.low-importance {
    border-left-color: #6bcf7f;
}

.fact-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 8px;
}

.fact-text {
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
}

.fact-relevance {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    #generateBtn {
        width: 100%;
    }
    
    .copy-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}

/* Animations */
.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}