:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: var(--background-color);
    min-height: 100vh;
}

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.login-box {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-box h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.password-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: var(--danger-color);
    margin: 10px 0;
    display: none;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.main-content {
    display: none;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--danger-color);
    z-index: 100;
}

.card {
    background: var(--card-background);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card-background);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.controls {
    margin: 15px 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.floating-tools {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.history-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background: var(--card-background);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 90;
}

.history-panel.active {
    right: 0;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--success-color);
    color: white;
    display: none;
    animation: slideDown 0.3s ease;
    z-index: 1000;
}

@keyframes slideDown {
    from { transform: translate(-50%, -100%); }
    to { transform: translate(-50%, 0); }
}

.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: var(--card-background);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.advanced-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Dark theme */
body.dark-theme {
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --primary-color: #64B5F6;
    color: #ffffff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .floating-tools {
        bottom: 10px;
        right: 10px;
    }
    
    .history-panel {
        width: 100%;
        right: -100%;
    }
    
    .history-panel.active {
        right: 0;
    }
}