* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0d0d1a;
    color: #e0e0e0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #16162e;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    border: 1px solid #2a2a5a;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a2a5a;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: #1a1a3e;
}

.status.online {
    color: #00ff88;
    border: 1px solid #00ff88;
}

.status.offline {
    color: #ff4466;
    border: 1px solid #ff4466;
}

.status.checking {
    color: #ffaa44;
    border: 1px solid #ffaa44;
}

.btn-login {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #667eea;
    color: #fff;
}

.btn-logout {
    color: #ff4466;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #ff4466;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ff4466;
    color: #fff;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 24px;
    background: #1a1a3e;
    border: none;
    border-radius: 10px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.tab:hover {
    background: #2a2a5a;
    color: #fff;
}

.tab.active {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-block, .birthday-block {
    background: #1a1a3e;
    padding: 20px;
    border-radius: 12px;
}

h2 {
    color: #f5576c;
    font-size: 18px;
    margin-bottom: 20px;
}

h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.field {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #a8b2d1;
    font-size: 14px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #2a2a5a;
    border-radius: 8px;
    background: #0d0d1a;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #f5576c;
    box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.2);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

small b {
    color: #a8b2d1;
}

hr {
    border: none;
    border-top: 1px solid #2a2a5a;
    margin: 20px 0;
}

.add-birthday {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.add-birthday input {
    flex: 1;
    min-width: 80px;
}

.add-birthday button {
    flex: 0 0 auto;
}

button {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.3);
}

#birthdayList {
    background: #0d0d1a;
    padding: 10px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    -webkit-overflow-scrolling: touch;
}

#birthdayList::-webkit-scrollbar {
    width: 8px;
}

#birthdayList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#birthdayList::-webkit-scrollbar-thumb {
    background: #f5576c;
    border-radius: 10px;
}

.birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #2a2a5a;
}

.birthday-item:last-child {
    border-bottom: none;
}

.birthday-item .info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.birthday-item .date {
    color: #f5576c;
    font-weight: bold;
}

.birthday-item .nickname {
    color: #a8b2d1;
}

.birthday-item .userid {
    color: #666;
    font-size: 12px;
}

.delete-btn {
    background: #ff4466;
    border: none;
    color: #fff;
    padding: 4px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.delete-btn:hover {
    background: #cc3355;
    transform: none;
}

#saveStatus {
    margin-left: 15px;
    color: #00ff88;
    font-weight: 500;
}

#statusSaveStatus {
    margin-left: 15px;
    color: #00ff88;
    font-weight: 500;
}

.empty {
    text-align: center;
    color: #666;
    padding: 30px 20px;
}

.footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #2a2a5a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-center {
    color: #f5576c;
    text-align: center;
    flex: 1;
    font-weight: 500;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ВХОДА ===== */
.login-container {
    background: #16162e;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #2a2a5a;
    max-width: 400px;
    margin: 100px auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-container .field {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    color: #a8b2d1;
    font-size: 14px;
    font-weight: 500;
}

.login-container input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #2a2a5a;
    border-radius: 10px;
    background: #0d0d1a;
    color: #e0e0e0;
    font-size: 14px;
    box-sizing: border-box;
}

.login-container input:focus {
    outline: none;
    border-color: #f5576c;
}

.login-container button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(245, 87, 108, 0.4);
}

.login-container .error {
    color: #ff4466;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 68, 102, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 68, 102, 0.2);
}

.login-container .footer {
    text-align: center;
    margin-top: 25px;
    color: #555;
    font-size: 13px;
}

.login-container .footer span {
    color: #f5576c;
}

/* ===== ПАНЕЛЬ АДМИНА ===== */
.admin-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(245, 87, 108, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(245, 87, 108, 0.2);
}

.admin-panel h2 {
    color: #f5576c;
    font-size: 16px;
    margin-bottom: 15px;
}

.admin-panel select {
    padding: 10px 14px;
    border: 2px solid #2a2a5a;
    border-radius: 8px;
    background: #0d0d1a;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}

.admin-panel select:focus {
    outline: none;
    border-color: #f5576c;
}

.admin-panel select option {
    background: #0d0d1a;
    color: #e0e0e0;
}

/* ===== СТИЛИ ДЛЯ СТАТУСОВ ===== */
#currentStatusDisplay {
    background: #0d0d1a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #2a2a5a;
    margin-top: 15px;
}

#currentStatusDisplay p {
    color: #888;
    margin-bottom: 5px;
}

#currentBotStatus {
    color: #00ff88;
    font-size: 18px;
    font-family: monospace;
    transition: all 0.3s;
    word-break: break-all;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 12px;
        border-radius: 12px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 8px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .header-controls {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        align-items: center;
    }
    
    .btn-login, .btn-logout {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 6px;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 13px;
        text-align: center;
        width: 100%;
    }
    
    .settings-block, .birthday-block {
        padding: 12px;
    }
    
    h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    .field {
        margin-bottom: 12px;
    }
    
    label {
        font-size: 13px;
    }
    
    input, textarea {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    textarea {
        min-height: 60px;
    }
    
    button {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
    }
    
    .add-birthday {
        flex-direction: column;
    }
    
    .add-birthday input {
        width: 100%;
        min-width: unset;
    }
    
    .add-birthday button {
        width: 100%;
    }
    
    .birthday-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 10px;
    }
    
    .birthday-item .info {
        gap: 8px;
        font-size: 13px;
    }
    
    .birthday-item .date {
        font-size: 14px;
    }
    
    .delete-btn {
        padding: 4px 12px;
        font-size: 12px;
        align-self: flex-end;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        font-size: 12px;
    }
    
    .footer-center {
        order: 2;
    }
    
    .admin-panel {
        padding: 12px;
    }
    
    .admin-panel select {
        padding: 8px 12px;
        font-size: 13px;
        width: 100%;
    }
    
    .admin-panel .info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    #currentStatusDisplay {
        padding: 12px;
    }
    
    #currentBotStatus {
        font-size: 14px;
    }
    
    .birthday-block .info-box {
        padding: 12px;
    }
    
    .birthday-block .info-box .field-info {
        min-width: 80px;
        padding: 8px;
    }
    
    .login-container {
        padding: 20px;
        margin: 30px 10px;
        width: auto;
    }
    
    .login-container h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .login-container input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .login-container button {
        padding: 12px;
        font-size: 15px;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 400px) ===== */
@media (max-width: 400px) {
    .container {
        padding: 8px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .status {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .tab {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .birthday-item .info {
        font-size: 12px;
    }
    
    .birthday-item .date {
        font-size: 13px;
    }
}

/* ===== УЛУЧШЕННЫЙ ВВОД ДЛЯ ТЕЛЕФОНА ===== */
input[type="text"],
input[type="number"],
input[type="time"],
input[type="password"],
textarea {
    font-size: 16px !important;
}