* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.person-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.person-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.person-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.person-count {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.btn-click {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-click:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-click:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-click:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.total-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.total-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.total-count {
    font-size: 36px;
    font-weight: 700;
}

.reset-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.click-animation {
    animation: clickPulse 0.3s ease;
}

@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Stiluri pentru ecranul de login */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.pin-input {
    width: 100%;
    padding: 20px;
    font-size: 32px;
    text-align: center;
    border: 3px solid #667eea;
    border-radius: 15px;
    margin-bottom: 20px;
    letter-spacing: 10px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.pin-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.pin-key {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 20px;
    font-size: 28px;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.pin-key:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.pin-key:active {
    transform: scale(0.95);
}

.pin-key.delete {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    grid-column: span 2;
}

.pin-key.delete:hover {
    background: #c82333;
    border-color: #c82333;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #dc3545;
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.user-info {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info.admin {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hidden {
    display: none !important;
}

/* Statistici Admin */
.admin-stats {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.admin-stats h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ffe69c;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #856404;
    font-weight: 500;
}

.stat-value {
    color: #856404;
    font-weight: 700;
}

.ranking {
    display: flex;
    align-items: center;
    gap: 5px;
}

.medal {
    font-size: 20px;
}

/* Status sincronizare */
.sync-status {
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: #28a745;
    background: #d4edda;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sync-status.syncing {
    color: #17a2b8;
    background: #d1ecf1;
}

.sync-status.error {
    color: #dc3545;
    background: #f8d7da;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.syncing #syncIcon {
    animation: rotate 2s linear infinite;
}
