/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    min-height: 100vh;
    color: #fff;
    line-height: 1.6;
}

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

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-back span {
    font-size: 1.1rem;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Panels */
.panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel h2 {
    margin-bottom: 15px;
    color: #38bdf8;
}

.panel p {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.panel a {
    color: #38bdf8;
    text-decoration: none;
}

.panel a:hover {
    text-decoration: underline;
}

/* Input groups */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
}

.input-group input::placeholder {
    color: #64748b;
}

.input-group input:focus {
    outline: none;
    border-color: #38bdf8;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.2rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 0.9em;
}

/* Status bar */
.status-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
}

.status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.connecting {
    background: #f59e0b;
    animation: pulse 1s infinite;
}

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

/* Coinbase Link */
.coinbase-link {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 82, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 82, 255, 0.3);
}

.btn-coinbase {
    background: linear-gradient(135deg, #0052FF, #0033CC);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
}

.btn-coinbase:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 82, 255, 0.4);
}

.link-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
}

/* Session Active Indicator */
.session-active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 50px;
    margin: 20px auto;
    color: #22c55e;
    font-weight: 600;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-green 1.5s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

/* Say Hello Prompt - BIG and prominent */
.say-hello {
    text-align: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
    border: 3px solid rgba(249, 115, 22, 0.6);
    border-radius: 16px;
    margin: 25px 0;
    animation: fadeIn 0.5s ease, pulse-orange 2s ease-in-out infinite;
}

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

@keyframes pulse-orange {
    0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.3); }
    50% { box-shadow: 0 0 40px rgba(249, 115, 22, 0.5); }
}

.say-hello-icon {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.say-hello-text {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f97316;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.say-hello-hint {
    font-size: 1.1rem;
    color: #cbd5e1;
}

/* iOS Warning */
.ios-warning {
    text-align: center;
    padding: 25px;
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    margin-bottom: 20px;
}

.ios-warning-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.ios-warning-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 8px;
}

.ios-warning-text {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 10px;
    line-height: 1.5;
}

.ios-warning-hint {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #0a1628, #1e3a5f);
    border: 2px solid rgba(56, 189, 248, 0.4);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 15px;
}

.modal-text {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.modal-steps {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.modal-step {
    color: #e2e8f0;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-step:last-child {
    border-bottom: none;
}

.modal-step strong {
    color: #38bdf8;
}

.modal-hint {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.modal-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #f59e0b;
    font-weight: 600;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(245, 158, 11, 0.3);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Instructions */
.instructions {
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #38bdf8;
}

.instructions h3 {
    color: #38bdf8;
    margin-bottom: 12px;
}

.instructions ol {
    padding-left: 20px;
    color: #cbd5e1;
}

.instructions li {
    margin-bottom: 8px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

/* Preview area */
.preview-area {
    margin-bottom: 25px;
}

.preview-area h3 {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.preview-area video {
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    background: #000;
    object-fit: contain;
}

/* Audio indicator */
.audio-indicator {
    margin-bottom: 25px;
}

.audio-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.audio-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.audio-level {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 4px;
    transition: width 0.1s ease;
}

/* Transcript area */
.transcript-area {
    margin-bottom: 25px;
}

.transcript-area h3 {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.transcript {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.transcript-entry {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 8px;
}

.transcript-entry.user {
    background: rgba(56, 189, 248, 0.2);
    margin-left: 20%;
}

.transcript-entry.ai {
    background: rgba(129, 140, 248, 0.2);
    margin-right: 20%;
}

.transcript-entry .speaker {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.transcript-entry .text {
    color: #e2e8f0;
}

/* Settings */
.settings {
    display: flex;
    justify-content: flex-end;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.8rem;
    }

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

    .status-bar {
        justify-content: center;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-large {
        justify-content: center;
    }
}
