/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Форма сообщения */
.message-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #fff;
}

.char-counter {
    text-align: right;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

button {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #667eea;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Honeypot для ботов */
.honeypot {
    display: none;
}

/* Статус сообщения */
.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    background: rgba(76, 175, 80, 0.9);
}

.status-message.error {
    background: rgba(244, 67, 54, 0.9);
}

.status-message.info {
    background: rgba(33, 150, 243, 0.9);
}

.message-meta {
    margin-top: 0.5rem;
    font-size: 12px;
    color: #666;
}

.message-date {
    margin-right: 1rem;
}

.message-status {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.status-pending {
    background: #FFC107;
    color: #333;
}

.status-approved {
    background: #4CAF50;
    color: white;
}

.status-rejected {
    background: #f44336;
    color: white;
}

.status-displayed {
    background: #2196F3;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    opacity: 0.7;
    font-size: 1.2rem;
}

.error {
    background: rgba(244, 67, 54, 0.9);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

/* Панель модератора */
.moderation-panel {
    max-width: 1200px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: #2196F3;
    color: white;
    width: auto;
    margin-top: 0;
}

.btn-danger {
    background: #f44336;
    color: white;
    width: auto;
    margin-top: 0;
}

.stats-bar {
    display: flex;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.status-active {
    color: #4CAF50;
}

.status-stopped {
    color: #f44336;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-text {
    flex: 1;
    margin-right: 1rem;
    font-size: 16px;
    line-height: 1.5;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.message-actions button {
    width: auto;
    padding: 0.5rem 1rem;
    margin-top: 0;
    font-size: 14px;
}

.btn-approve {
    background: #4CAF50;
    color: white;
}

.btn-reject {
    background: #f44336;
    color: white;
}

/* Экран вывода */
.display-screen {
    background: #000;
    overflow: hidden;
}

.screen-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.screen-header {
    text-align: center;
    padding: 1rem;
}

.screen-header h1 {
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.message-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.current-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 16px;
    max-width: 80%;
    animation: fadeIn 0.5s ease-in;
}

.current-message p {
    font-size: 3rem;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.no-messages {
    text-align: center;
    opacity: 0.5;
    font-size: 1.5rem;
}

.emergency-stop {
    background: rgba(244, 67, 54, 0.9);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
}

.emergency-stop h2 {
    font-size: 2rem;
}

.screen-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    font-size: 14px;
    opacity: 0.7;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    margin-left: 0.5rem;
}

.status-dot.disconnected {
    background: #f44336;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .panel-header {
        flex-direction: column;
        gap: 1rem;
    }

    .controls {
        width: 100%;
        justify-content: space-between;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .message-card {
        flex-direction: column;
        align-items: stretch;
    }

    .message-actions {
        margin-top: 1rem;
        justify-content: flex-end;
    }

    .current-message p {
        font-size: 2rem;
    }
}
/* === ЭКРАН ЛОГИНА === */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f5f5;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 300px;
}

.login-box h2 {
    margin-bottom: 24px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.login-box button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-box button:hover {
    background: #0056b3;
}

/* === КНОПКА ВЫХОДА === */
.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #545b62;
}