/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 32px 24px;
}

/* Setup Section */
.setup-section {
    text-align: center;
    padding: 24px;
}

.setup-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.setup-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.input-group {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 16px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Control Section */
.control-section {
    text-align: center;
    margin-bottom: 32px;
}

.btn-toggle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 24px;
}

.btn-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.btn-toggle:active {
    transform: scale(0.98);
}

.btn-toggle.listening {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-toggle.listening:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-icon {
    font-size: 3rem;
}

.btn-text {
    font-size: 1.125rem;
}

/* Listening Indicator */
.listening-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 16px;
}

.listening-indicator.active {
    display: flex;
}

.pulse {
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* Status Message */
.status-message {
    min-height: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.status-message.error {
    color: var(--danger-color);
}

.status-message.success {
    color: var(--success-color);
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 24px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.dashboard.visible {
    opacity: 1;
}

.dashboard-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.dashboard-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.topic-display {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
}

.key-points-list,
.questions-list {
    list-style: none;
}

.key-points-list li,
.questions-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.key-points-list li:last-child,
.questions-list li:last-child {
    border-bottom: none;
}

.key-points-list li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.25rem;
}

.questions-list li:before {
    content: "💬";
    margin-right: 12px;
}

.placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.placeholder:before {
    opacity: 0.5;
}

.last-updated {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-primary:active {
    transform: scale(0.98);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.privacy-notice {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.privacy-notice strong {
    color: var(--success-color);
}

.browser-notice {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    header {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 24px 16px;
    }

    .btn-toggle {
        width: 160px;
        height: 160px;
    }

    .btn-icon {
        font-size: 2.5rem;
    }

    .btn-text {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }
}

/* Animations for updates */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-section.updating {
    animation: fadeIn 0.5s ease;
}
