* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0f;
    background-image: 
        radial-gradient(at 20% 30%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    color: #e4e4e7;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    max-width: 480px;
    background: rgba(15, 15, 25, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 60px rgba(99, 102, 241, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.top-bar {
    padding: 24px 20px;
    text-align: center;
    background: rgba(15, 15, 25, 0.5);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.invite-box {
    font-size: 0.9rem;
}

.label {
    display: block;
    margin-bottom: 10px;
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-wrapper {
    display: flex;
    background: rgba(30, 30, 45, 0.6);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: border-color 0.3s ease;
}

.link-wrapper:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
}

.link-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e4e4e7;
    font-size: 0.85rem;
    padding: 8px 12px;
    width: 100px;
    text-overflow: ellipsis;
    outline: none;
}

.link-wrapper button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.link-wrapper button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.link-wrapper button:active {
    transform: translateY(0);
}

.caller-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 32px;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pulse-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    border: 2px solid #6366f1;
    z-index: 1;
    opacity: 0;
}

.pulsing {
    animation: pulse-animation 2s ease-out infinite;
}

@keyframes pulse-animation {
    0% { 
        transform: scale(0.95); 
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
    100% { 
        transform: scale(1.3); 
        opacity: 0;
    }
}

#status-text {
    font-weight: 500;
    font-size: 1.75rem;
    margin: 0;
    background: linear-gradient(135deg, #e4e4e7 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#timer {
    margin-top: 12px;
    color: #71717a;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 500;
    visibility: hidden;
    letter-spacing: 2px;
}

.controls-area {
    padding: 32px;
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-bottom: 48px;
    background: rgba(10, 10, 15, 0.3);
}

.control-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.control-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    display: block;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

.control-btn:hover svg {
    transform: translate(-50%, -50%);
}

.control-btn:active {
    transform: translateY(0) scale(0.95);
}

.control-btn:active svg {
    transform: translate(-50%, -50%);
}

.mic-active {
    background: rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mic-active svg {
    fill: #6366f1;
}

.mic-active:hover {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.mic-muted {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.3);
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mic-muted svg {
    fill: #ef4444;
}

.mic-muted:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.speaker-off {
    background: rgba(156, 163, 175, 0.15);
    border: 2px solid rgba(156, 163, 175, 0.3);
    box-shadow: 
        0 4px 16px rgba(156, 163, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.speaker-off svg {
    fill: #9ca3af;
}

.speaker-off:hover {
    background: rgba(156, 163, 175, 0.25);
    box-shadow: 0 6px 20px rgba(156, 163, 175, 0.3);
}

.speaker-on {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.3);
    box-shadow: 
        0 4px 16px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.speaker-on svg {
    fill: #22c55e;
}

.speaker-on:hover {
    background: rgba(34, 197, 94, 0.25);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.hangup-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid rgba(239, 68, 68, 0.3);
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hangup-btn svg {
    fill: white;
}

.hangup-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.5);
}

/* Экран звонка */
#call-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Главная страница */
#home-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-content {
    text-align: center;
    padding: 48px;
}

.home-content h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #e4e4e7 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.home-content p {
    color: #a1a1aa;
    margin-bottom: 48px;
    font-size: 1.1rem;
    font-weight: 400;
}

.create-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.create-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.download-app-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-app-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #e4e4e7;
    transform: translateY(-2px);
}

.download-app-btn:active {
    transform: translateY(0);
}

/* Скрываем кнопку скачивания в приложении */
body.in-app .download-app-btn {
    display: none !important;
}

/* Адаптивность для кнопок копировать/поделиться */
.mobile-only {
    display: none;
}

.desktop-only {
    display: inline-block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline-block;
    }
    
    .desktop-only {
        display: none;
    }
}
