/* Custom styles for P2P Premium Chat */
.p2p-app {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--font-text);
}

.p2p-container {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.app-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.version-badge {
    font-size: 12px;
    font-weight: 700;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.app-subtitle {
    text-align: center;
    font-size: 13px;
    color: #86868b;
    margin-bottom: 24px;
}

.status-panel {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #5b21b6;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    margin-bottom: 24px;
}

.param-alert {
    display: none;
    background: rgba(236, 72, 153, 0.05);
    border: 1px solid rgba(236, 72, 153, 0.2);
    color: #be185d;
    padding: 16px;
    border-radius: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    margin-bottom: 24px;
}

.param-alert.active {
    display: flex;
    flex-wrap: wrap;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.signaling-area {
    background: var(--color-section-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    margin-bottom: 32px;
}

.signaling-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.signaling-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .signaling-grid {
        grid-template-columns: 1fr;
    }
}

.signaling-box {
    background: var(--color-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.box-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.box-title.host { color: #8b5cf6; }
.box-title.guest { color: #2563eb; }

.btn-purple {
    background: #8b5cf6;
    color: white;
    border: none;
    width: 100%;
}
.btn-purple:hover { background: #7c3aed; }

.btn-blue {
    background: #2563eb;
    color: white;
    border: none;
    width: 100%;
}
.btn-blue:hover { background: #1d4ed8; }

.btn-pink {
    background: #ec4899;
    color: white;
    border: none;
}
.btn-pink:hover { background: #db2777; }

.btn-dark {
    background: #1e293b;
    color: white;
    border: none;
}
.btn-dark:hover { background: #0f172a; }

.input-code {
    width: 100%;
    padding: 10px;
    background: var(--color-section-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-primary);
    outline: none;
}

.input-code:focus {
    border-color: #8b5cf6;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-wrapper {
    position: relative;
    background: #020617;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 4px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #020617;
    font-size: 13px;
    z-index: 5;
}

.camera-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: rgba(0,0,0,0.4);
    padding: 8px;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #8b5cf6;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
}

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

.stat-label {
    display: block;
    color: #86868b;
    margin-bottom: 4px;
}

.stat-value {
    font-weight: 700;
}

.toast-message {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

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