* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #0a1f2e 0%, #1b3b4f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #e0f2fe;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(10, 31, 46, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid #2c5f7a;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 180, 216, 0.3);
    padding: 30px;
}

/* Шапка */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #2c5f7a;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #b8e2f2;
    text-shadow: 0 0 8px #00b4d8;
}

.datetime {
    font-size: 1.1rem;
    background: rgba(0, 180, 216, 0.15);
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid #2c5f7a;
    backdrop-filter: blur(4px);
    color: #ade8f4;
}

.datetime i {
    margin-right: 5px;
    color: #00b4d8;
}

/* Форма входа */
.login-section {
    max-width: 400px;
    margin: 40px auto;
}

.login-form {
    background: rgba(15, 40, 55, 0.9);
    backdrop-filter: blur(4px);
    padding: 35px 30px;
    border-radius: 20px;
    border: 1px solid #2c5f7a;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 300;
    color: #b8e2f2;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #ade8f4;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

label i {
    margin-right: 8px;
    color: #00b4d8;
}

input {
    width: 100%;
    padding: 14px 18px;
    background: #0b2637;
    border: 1px solid #2a4b5e;
    border-radius: 40px;
    font-family: inherit;
    color: #e0f2fe;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
}

input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 12px #00b4d8;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #007a99, #005f73);
    border: none;
    border-radius: 40px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #00b4d8;
}

.btn:hover {
    background: linear-gradient(135deg, #0096b0, #007a99);
    box-shadow: 0 0 15px #00b4d8;
    transform: scale(1.02);
}

.error-message {
    color: #ffb3b3;
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Страница камер */
.cameras-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cameras-header h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #b8e2f2;
}

.logout-btn {
    width: auto;
    padding: 10px 25px;
    background: #3d5a73;
    border-color: #6c8d9c;
}

.cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.camera-card {
    background: rgba(15, 40, 55, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid #2c5f7a;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.camera-card:hover {
    transform: translateY(-8px);
    border-color: #00b4d8;
    box-shadow: 0 15px 30px rgba(0, 180, 216, 0.3);
}

.camera-thumb {
    height: 160px;
    background: #0b2637;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #2c5f7a;
}

.camera-thumb i {
    font-size: 4rem;
    color: #00b4d8;
    opacity: 0.8;
}

.camera-info {
    padding: 18px;
}

.camera-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #b8e2f2;
}

.camera-info p {
    font-size: 0.9rem;
    color: #9ac7d9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.camera-info p i {
    color: #00b4d8;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border: 3px solid #00b4d8;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 0 50px #00b4d8;
}

.modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #00b4d8;
}

#modalVideo {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 12px;
}

/* Адаптивность */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .logo h1 {
        font-size: 1.3rem;
    }
    .datetime {
        font-size: 0.9rem;
    }
    .cameras-header {
        flex-direction: column;
        gap: 15px;
    }
    .cameras-header h2 {
        font-size: 1.5rem;
    }
    .logout-btn {
        width: 100%;
    }
}
.camera-datetime {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6c8d9c;
    display: flex;
    align-items: center;
    gap: 5px;
    border-top: 1px dashed #2c5f7a;
    padding-top: 8px;
}

.camera-datetime i {
    color: #00b4d8;
    font-size: 0.9rem;
}