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

:root {
    --primary-color: #4a90e2;
    --success-color: #52c41a;
    --danger-color: #ff4d4f;
    --donate-color: #e74c3c;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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;
    padding: 2rem 1rem;
    color: var(--text-primary);
}

.container, .player-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Card Header - Consolidated Section */
.card-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.card-header img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.gofundme-notice {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.social-media-blurb {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.social-media-blurb .hashtag {
    color: var(--primary-color);
    font-weight: 600;
}

.page-title {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.page-title h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-title p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.page-title .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.card, .player-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-donate {
    background: var(--donate-color);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    display: block;
    margin: 0 auto 1.5rem;
    width: fit-content;
}

.btn-donate:hover:not(:disabled) {
    background: #c0392b;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.icon {
    font-size: 1.2em;
}

/* Recording Controls */
.recording-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.recording-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
    text-align: center;
    padding: 1rem;
    display: none;
}

.recording-time.active {
    display: block;
}

/* File Upload */
.file-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-name {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.status-message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.status-message.info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* Player Page */
.player-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.now-playing {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.now-playing-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: var(--danger-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.now-playing h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.message-text {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

.player-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.playlist-info {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin: 1.5rem 0;
}

.auto-refresh {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Message Queue */
.message-queue {
    margin-top: 2rem;
}

.message-queue h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.message-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}

.message-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background: var(--bg-light);
}

.message-item.active {
    background: #e6f7ff;
    border-left: 4px solid var(--primary-color);
}

.message-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.message-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.message-item small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.7;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* Actions */
.actions {
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 2rem;
    opacity: 0.9;
}

footer p {
    margin: 0.5rem 0;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .card, .player-card {
        padding: 1.5rem;
    }

    .recording-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .player-controls {
        flex-direction: column;
    }
}
