/* src/styles/rally.css */

:root {
    --rally-bg: #0f172a; /* slate-900 */
    --rally-bg-gradient-from: #1e293b; /* slate-800 */
    --rally-bg-gradient-to: #000000;
    --rally-text: #f1f5f9; /* slate-100 */
    --rally-text-muted: #64748b; /* slate-500 */
    --rally-red: #ef4444; /* red-500 */
    --rally-red-dark: #b91c1c; /* red-700 */
    --rally-red-glow: rgba(239, 68, 68, 0.2);
    --rally-font-sans: 'Inter', sans-serif;
    --rally-font-display: 'Chakra Petch', sans-serif;
}

.rally-container {
    min-height: 100vh;
    background-color: var(--rally-bg);
    color: var(--rally-text);
    font-family: var(--rally-font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.rally-bg-decor {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, var(--rally-bg-gradient-from), var(--rally-bg), var(--rally-bg-gradient-to));
    z-index: 0;
}

.rally-top-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--rally-red), transparent);
    opacity: 0.5;
    z-index: 1;
}

.rally-main {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.rally-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.rally-title {
    font-family: var(--rally-font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--rally-red);
    text-transform: uppercase;
    font-style: italic;
    margin: 0;
}

.rally-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rally-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #475569; /* slate-600 */
}

.rally-status-dot.connected {
    background-color: #22c55e; /* green-500 */
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.rally-status-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8; /* slate-400 */
    font-weight: 500;
}

.rally-visualizer-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.rally-visualizer-circle {
    position: relative;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    border: 1px solid #334155; /* slate-700 */
    background: rgba(30, 41, 59, 0.5); /* slate-800/50 */
    backdrop-filter: blur(4px);
    box-shadow: 0 0 50px -12px var(--rally-red-glow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rally-visualizer-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.rally-visualizer-status-text {
    font-family: var(--rally-font-display);
    text-transform: uppercase;
    font-size: 0.875rem;
    opacity: 0.8;
}

.rally-visualizer-status-text.connecting {
    color: #facc15; /* yellow-400 */
    animation: pulse 1s infinite;
}

.rally-visualizer-status-text.disconnected {
    color: var(--rally-text-muted);
}

.rally-error {
    background: rgba(127, 29, 29, 0.5); /* red-900/50 */
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca; /* red-200 */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.rally-controls {
    margin-top: auto;
    margin-bottom: 3rem;
}

.rally-btn {
    width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.rally-btn-call {
    background: linear-gradient(135deg, var(--rally-red), var(--rally-red-dark));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rally-btn-call:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(185, 28, 28, 0.5);
}

.rally-btn-call:active {
    transform: scale(0.98);
}

.rally-btn-hangup {
    background: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    color: #cbd5e1; /* slate-300 */
}

.rally-btn-hangup:hover {
    background: #334155; /* slate-700 */
    color: white;
}

.rally-btn-text-group {
    text-align: left;
}

.rally-btn-title {
    display: block;
    font-family: var(--rally-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0.025em;
}

.rally-btn-subtitle {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

.rally-footer {
    text-align: center;
    color: var(--rally-text-muted);
    font-size: 0.75rem;
    margin-top: 1.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
