/* public/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #e6e6e6;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#auth-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

#auth-panel h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #fff;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.auth-form button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    background: #4cc9f0;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form button:hover {
    background: #36a9e0;
}

.auth-form p {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.7);
}

#app {
    display: flex;
    width: 100%;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 20px;
    color: #4cc9f0;
}

#contacts-list {
    list-style: none;
}

#contacts-list li {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#contacts-list li:hover {
    background: rgba(255, 255, 255, 0.2);
}

#contacts-list li.premium-user {
    border-left: 5px solid #f0c040;
}

.premium-icon {
    color: #f0c040;
}

.premium-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#premium-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #f0c040;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#premium-button:hover:not(:disabled) {
    background: #e0b030;
}

#premium-button:disabled {
    opacity: 0.7;
    cursor: default;
}

#premium-status {
    margin-top: 10px;
    color: #f0c040;
    font-size: 14px;
    text-align: center;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.chat-header h2 {
    color: #4cc9f0;
}

#call-button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: #4cc9f0;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#call-button:hover:not(:disabled) {
    background: #36a9e0;
}

#call-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
}

.message.sent {
    background: #4cc9f0;
    color: #1a1a2e;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.received {
    background: rgba(255, 255, 255, 0.1);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
    opacity: 0.7;
}

.message-input {
    display: flex;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
}

.message-input button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: #4cc9f0;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.message-input button:hover:not(:disabled) {
    background: #36a9e0;
}

.message-input button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

/* Окно звонка */
#call-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.call-container {
    width: 90%;
    max-width: 1000px;
    text-align: center;
}

.video-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.video-container video {
    width: 50%;
    border-radius: 10px;
    background: #000;
}

.call-controls button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: #ff4d4d;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.call-controls button:hover {
    background: #ff3333;
}

/* Адаптивность */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 40%;
    }

    .main {
        height: 60%;
    }

    .video-container {
        flex-direction: column;
    }

    .video-container video {
        width: 100%;
    }
}