/* =====================================================
   TACTICO - Main Stylesheet
   Matches app.html with .header, .main-container, .right-panel structure
   ===================================================== */

/* CSS Variables */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #151b24;
    --bg-tertiary: #1a2332;
    --bg-card: #1f2937;
    --border-color: #2d3748;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --accent-primary: #00d4aa;
    --accent-secondary: #00a8ff;
    --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    --shadow-glow: 0 0 20px rgba(0, 212, 170, 0.3);
    --toolbar-width: 70px;
    --panel-width: 300px;
    --record-red: #ff4757;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    height: 60px;
    background: linear-gradient(135deg, #1a2332 0%, #0d1117 50%, #1a2332 100%);
    border-bottom: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 212, 170, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.brand-slogan {
    font-size: 8px;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.header-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.header-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

.header-select:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-select:focus {
    outline: none;
    background: rgba(0, 212, 170, 0.1);
}

/* Legacy support */
.sport-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.sport-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sport-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.plan-name-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    width: 140px;
}

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

.mode-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

.mode-btn.active {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: flex-end;
}

/* Auth Loading Placeholder */
.auth-loading-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}

.auth-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

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

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */
.main-container {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* =====================================================
   LEFT TOOLBAR
   ===================================================== */
.toolbar {
    width: var(--toolbar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    overflow-y: auto;
    flex-shrink: 0;
}

.tool-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.tool-btn.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tool-divider {
    width: 36px;
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--accent-primary);
}

/* =====================================================
   CANVAS AREA
   ===================================================== */
.canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.canvas-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    height: 100%;
}

#mainCanvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Trash Zone - positioned to the left of the canvas */
.trash-zone {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-100%);
    padding: 20px 16px;
    background: rgba(255, 71, 87, 0.15);
    border: 2px dashed rgba(255, 71, 87, 0.5);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ff4757;
    font-weight: 600;
    min-width: 80px;
    min-height: 100px;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 100;
}

.trash-icon {
    font-size: 32px;
}

.trash-text {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.trash-zone.visible {
    display: flex;
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    left: -100px;
}

.trash-zone.drag-over {
    background: rgba(255, 71, 87, 0.3);
    border-color: #ff4757;
    transform: translateY(-50%) translateX(0) scale(1.05);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

/* Recording Indicator */
.recording-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 71, 87, 0.9);
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

.recording-indicator.visible {
    display: flex;
}

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

/* =====================================================
   RIGHT PANEL
   ===================================================== */
.right-panel {
    width: var(--panel-width);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.panel-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Team Section */
.team-section {
    margin-bottom: 16px;
}

.team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.team-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.team-dot.team-a {
    background: #ff4757;
}

.team-dot.team-b {
    background: #3742fa;
}

.team-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* =====================================================
   PLAYER CHIPS - Number on top, Position below
   ===================================================== */
.player-chips {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.player-chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    cursor: grab;
    transition: all 0.2s;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    gap: 0;
    padding: 2px;
}

.player-chip:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.player-chip .player-number {
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: block;
}

.player-chip .player-position {
    font-size: 8px;
    line-height: 1;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 1px;
}

.player-chip.team-a {
    background: linear-gradient(135deg, #ff6b7a, #ff4757, #c0392b);
}

.player-chip.team-b {
    background: linear-gradient(135deg, #5a68fa, #3742fa, #1e3799);
}

/* Team Colors */
.team-colors-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-color-label {
    font-size: 11px;
    color: var(--text-muted);
    width: 50px;
}

.team-color-options {
    display: flex;
    gap: 6px;
    align-items: center;
}

.team-color-chip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.team-color-chip:hover {
    transform: scale(1.1);
}

.team-color-chip.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.team-color-custom {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
}

/* Equipment */
.equipment-grid {
    display: flex;
    gap: 8px;
}

.equipment-item {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: grab;
    transition: all 0.2s;
}

.equipment-item:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* Formations */
.formations-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.formations-header {
    margin-bottom: 12px;
}

.formation-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.formation-tab {
    flex: 1;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.formation-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.formation-tab.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* My Plans Search */
.myplans-search {
    margin-bottom: 10px;
}

.myplans-search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    transition: all 0.2s;
}

.myplans-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.1);
}

.myplans-search-input::placeholder {
    color: var(--text-muted);
}

/* Mode button icons */
.mode-icon {
    font-size: 14px;
}

.mode-text {
    font-size: 12px;
}

.formations-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.formation-card {
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.formation-card:hover {
    border-color: var(--accent-primary);
}

.formation-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.formation-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.formation-preview {
    width: 100%;
    height: 50px;
    background: var(--bg-primary);
    border-radius: 4px;
    margin-bottom: 6px;
    position: relative;
}

.formation-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
}

.formation-dot.team-a {
    background: #ff4757;
}

.formation-dot.team-b {
    background: #3742fa;
}

/* My Plans card style */
.formation-card.myplan {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}

.formation-card.myplan .formation-preview {
    width: 50px;
    height: 35px;
    flex-shrink: 0;
    margin-bottom: 0;
}

.myplan-info {
    flex: 1;
    min-width: 0;
}

.myplan-info .formation-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.myplan-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
}

.formation-card.myplan:hover .myplan-delete {
    opacity: 1;
}

.myplan-delete:hover {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.save-formation-btn {
    width: 100%;
    padding: 8px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.save-formation-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Formations locked state */
.formations-locked {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(255,71,87,0.05), rgba(255,71,87,0.1));
    border-radius: 12px;
    border: 1px dashed rgba(255,71,87,0.3);
}

.formations-locked .locked-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.formations-locked h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.formations-locked p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.btn-unlock {
    background: linear-gradient(135deg, #ff6b7a, #ff4757);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

/* Recording Section */
.recording-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.record-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.record-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.record-indicator.recording {
    background: var(--record-red);
    animation: pulse 1s infinite;
}

.record-time {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--accent-primary);
}

.record-resolution {
    font-size: 11px;
    color: var(--text-muted);
}

.record-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.record-btn {
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.record-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
}

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

.record-btn.start {
    background: var(--record-red);
    border-color: var(--record-red);
    color: white;
}

.record-btn.stop {
    background: var(--accent-gradient);
    border: none;
    color: var(--bg-primary);
}

/* Saved Plans */
.saved-plans {
    margin-bottom: 20px;
}

#plansList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.plan-info {
    flex: 1;
}

.plan-info .plan-name {
    font-size: 13px;
    font-weight: 500;
}

.plan-info .plan-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Clear Section */
.clear-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.screenshot-btn,
.clear-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.screenshot-btn:hover,
.clear-btn:hover {
    border-color: var(--accent-primary);
}

.clear-btn {
    border-color: var(--record-red);
    color: var(--record-red);
}

.clear-btn:hover {
    background: rgba(255, 71, 87, 0.15);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
}

/* Settings */
.settings-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-subtitle {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.settings-row label {
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-slider {
    width: 120px;
    accent-color: var(--accent-primary);
}

.settings-toggle {
    position: relative;
}

.settings-toggle input {
    opacity: 0;
    position: absolute;
}

.toggle-label {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}

.settings-toggle input:checked + .toggle-label {
    background: var(--accent-primary);
}

.settings-toggle input:checked + .toggle-label::after {
    left: 22px;
    background: white;
}

/* Formation Inputs */
.formation-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    margin-bottom: 12px;
}

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

/* Team Apply Buttons */
.team-apply-btns {
    display: flex;
    gap: 12px;
}

.team-apply-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    color: white;
}

.team-apply-btn.team-a {
    background: linear-gradient(135deg, #ff6b7a, #ff4757);
}

.team-apply-btn.team-b {
    background: linear-gradient(135deg, #5a68fa, #3742fa);
}

.team-apply-btn:hover {
    transform: translateY(-2px);
}

/* =====================================================
   PLAYER EDIT MODAL
   ===================================================== */
.player-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.player-edit-overlay.active {
    display: flex;
}

.player-edit-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    width: 380px;
    max-height: 90vh;
    overflow-y: auto;
}

.player-edit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.player-edit-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b7a, #ff4757);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    position: relative;
}

.preview-number {
    font-size: 18px;
    line-height: 1;
}

.preview-pos {
    font-size: 9px;
    opacity: 0.8;
}

.preview-name {
    position: absolute;
    bottom: -6px;
    font-size: 8px;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
}

.player-edit-title {
    font-size: 18px;
    font-weight: 600;
}

.player-edit-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-icon {
    font-size: 14px;
}

.optional-tag {
    font-weight: 400;
    color: var(--text-muted);
}

.number-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.num-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.num-btn:hover {
    border-color: var(--accent-primary);
}

.number-input {
    width: 60px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    text-align: center;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.position-chip,
.pos-chip {
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.position-chip:hover,
.pos-chip:hover {
    border-color: var(--accent-primary);
}

.position-chip.active,
.pos-chip.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.custom-position-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    margin-top: 6px;
}

.name-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
}

.name-suggestions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.name-chip {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.name-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Color presets in player edit */
.color-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-row-label {
    font-size: 10px;
    color: var(--text-muted);
    width: 45px;
}

.color-options {
    display: flex;
    gap: 6px;
}

.color-chip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-chip:hover {
    transform: scale(1.1);
}

.color-chip.active {
    border-color: white;
}

.custom-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.custom-color-label {
    font-size: 11px;
    color: var(--text-muted);
}

.custom-color-picker {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.apply-custom-color {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-custom-color:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.player-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.edit-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.edit-btn.cancel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.edit-btn.delete {
    background: rgba(255, 71, 87, 0.15);
    color: var(--record-red);
}

.edit-btn.save {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

/* =====================================================
   EQUIPMENT EDIT MODAL
   ===================================================== */
.equipment-edit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.equipment-preview {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.size-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.size-slider {
    flex: 1;
    accent-color: var(--accent-primary);
}

.size-value {
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 600;
    min-width: 40px;
}

.size-presets {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.size-preset-btn {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.size-preset-btn:hover {
    border-color: var(--accent-primary);
}

.size-preset-btn.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.equipment-type-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.equip-type-chip {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-type-chip:hover {
    border-color: var(--accent-primary);
}

.equip-type-chip.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
}

/* =====================================================
   TOAST
   ===================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--accent-primary);
}

.toast.error {
    border-color: var(--record-red);
}

/* =====================================================
   PRO BADGE - Animated Gradient
   ===================================================== */
.pro-badge,
.user-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ff6347, #ffd700);
    background-size: 300% 300%;
    animation: proGlow 3s ease infinite;
    color: #000;
    font-weight: 800;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 140, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

@keyframes proGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =====================================================
   UPGRADE MODAL
   ===================================================== */
.upgrade-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.upgrade-modal {
    background: linear-gradient(135deg, #1a2332 0%, #151b24 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 
        0 0 40px rgba(0, 212, 170, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.upgrade-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.upgrade-close:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.upgrade-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upgrade-modal h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.upgrade-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upgrade-price {
    margin: 20px 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-was {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 16px;
}

.price-now {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-upgrade {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    color: #0a0e14;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 170, 0.4);
}

.upgrade-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================================================
   UPGRADE BANNER
   ===================================================== */
.upgrade-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #1a2332, #0d1117, #1a2332);
    border-top: 1px solid rgba(0, 212, 170, 0.3);
    padding: 12px 20px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.upgrade-banner.dismissed {
    transform: translateY(100%);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.banner-icon {
    font-size: 20px;
}

.banner-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.banner-text strong {
    color: var(--text-primary);
}

.btn-banner {
    padding: 8px 16px;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    color: #0a0e14;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-banner:hover {
    transform: translateY(-1px);
}

.banner-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.banner-close:hover {
    color: #ff4757;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1200px) {
    :root {
        --panel-width: 260px;
    }
}

@media (max-width: 900px) {
    .header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
        gap: 12px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .right-panel {
        width: 240px;
    }
    
    .player-chips {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .toolbar {
        display: none;
    }
    
    .right-panel {
        display: none;
    }
    
    .canvas-wrapper {
        padding: 10px;
    }
}
/* =====================================================
   PRO BADGE - Animated Gradient Glow
   ===================================================== */
.plan-badge {
    font-weight: 800;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
}

.plan-badge.pro {
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ff6347, #ffd700);
    background-size: 300% 300%;
    animation: proGlow 3s ease infinite;
    color: #000;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 140, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.plan-badge.trial {
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    color: #000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes proGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* =====================================================
   AUTH MODAL STYLES
   Add this to the END of your css/styles.css
   ===================================================== */

/* Auth Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Auth Modal */
.auth-modal {
    background: linear-gradient(135deg, #1a2332 0%, #151b24 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 
        0 0 60px rgba(0, 212, 170, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

/* Header */
.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

.auth-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Body */
.auth-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
}

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

.auth-btn.google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.auth-btn.google:hover:not(:disabled) {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-btn.primary {
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    color: #0a0e14;
}

.auth-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
}

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

.auth-btn.secondary:hover:not(:disabled) {
    background: rgba(0, 212, 170, 0.1);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Input Groups */
.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-input-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    transition: all 0.2s;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.auth-input-group input::placeholder {
    color: var(--text-muted);
}

/* Auth Link */
.auth-link {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-align: center;
    transition: all 0.2s;
}

.auth-link:hover {
    text-decoration: underline;
    color: var(--accent-secondary);
}

/* Error Message */
.auth-error {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
}

.auth-error.error {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.auth-error.success {
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

/* Footer */
.auth-modal-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auth-modal-footer > p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.auth-footer-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Loading Spinner */
.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
    display: inline-block;
}

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

/* Plan Badge Styles (ensure these are present) */
.plan-badge {
    font-weight: 800;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
}

.plan-badge.pro {
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ff6347, #ffd700);
    background-size: 300% 300%;
    animation: proGlow 3s ease infinite;
    color: #000;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 140, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.plan-badge.trial {
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    color: #000;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes proGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* =====================================================
   MICROPHONE TOGGLE FOR RECORDING
   ===================================================== */
.mic-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
}

.mic-toggle-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mic-toggle-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
}

.mic-toggle-btn.active {
    background: rgba(0, 212, 170, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

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

.mic-status {
    font-size: 11px;
    color: var(--text-muted);
}

/* =====================================================
   TRIAL COUNTDOWN
   ===================================================== */
.trial-countdown,
.trial-expired {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    font-size: 14px;
    margin: 10px 20px;
}

.trial-expired {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(255, 100, 100, 0.1) 100%);
    border-color: rgba(255, 71, 87, 0.3);
}

.countdown-icon,
.expired-icon {
    font-size: 20px;
}

.countdown-text,
.expired-text {
    flex: 1;
    color: var(--text-primary);
}

.countdown-upgrade,
.expired-upgrade {
    padding: 6px 16px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s;
}

.countdown-upgrade:hover,
.expired-upgrade:hover {
    transform: scale(1.05);
}

/* =====================================================
   HEADER TRIAL COUNTDOWN (App Header)
   ===================================================== */
.trial-countdown-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(0, 168, 255, 0.15) 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
}

.countdown-days {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 14px;
}

.countdown-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.btn-cancel-trial {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: #ff4757;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    margin-left: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cancel-trial:hover {
    background: rgba(255, 71, 87, 0.25);
    border-color: #ff4757;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.3);
}

/* Profile Button Styles */
.btn-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
}

.btn-profile:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
    transform: scale(1.05);
}

.btn-profile svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
