* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

main {
    padding: 30px;
}

.alert {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #99d6ff;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.qr-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.qr-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2em;
}

.qr-reader-container {
    text-align: center;
    margin-bottom: 30px;
}

#qr-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border: 3px solid #3498db;
    border-radius: 10px;
    overflow: hidden;
}

.manual-input {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.manual-input h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.manual-input form {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.manual-input input {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
}

.manual-input input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.today-records {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.today-records h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.8em;
}

.records-list {
    display: grid;
    gap: 15px;
}

.record-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #3498db;
}

.record-info strong {
    font-size: 1.2em;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.record-times {
    color: #666;
    font-size: 1em;
}

.working {
    color: #27ae60;
    font-weight: bold;
}

.no-records {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    font-size: 1.1em;
}

/* Tablo stilleri */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #34495e;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

tr:hover {
    background: #f8f9fa;
}

/* Form stilleri */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Modal stilleri */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Responsive tasarım - Tablet */
@media (max-width: 1024px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }

    header {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 2.2em;
    }

    main {
        padding: 25px 20px;
    }

    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        min-width: 200px;
        padding: 18px 25px;
        font-size: 1.2em;
    }
}

/* Responsive tasarım - Mobil */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .manual-input form {
        flex-direction: column;
    }

    .manual-input input {
        min-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    th, td {
        padding: 10px 8px;
        font-size: 0.9em;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

/* QR Reader özel stilleri */
#qr-reader video {
    border-radius: 8px;
}

#qr-reader__dashboard {
    background: #f8f9fa !important;
    border-radius: 0 0 8px 8px !important;
}

#qr-reader__dashboard_section {
    padding: 10px !important;
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert {
    animation: fadeIn 0.5s ease-out;
}

.record-item {
    animation: fadeIn 0.3s ease-out;
}

/* Yazdırma stilleri */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    header {
        background: white !important;
        color: black !important;
    }

    .nav-buttons,
    .qr-section,
    .btn {
        display: none !important;
    }

    .today-records {
        background: white;
    }
}

/* Özel durumlar */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.status-inactive {
    color: #e74c3c;
    font-weight: bold;
}

.total-amount {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    margin: 20px 0;
}
/* Kamera bilgisi için stil */
.camera-info {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    text-align: center;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.camera-info small {
    display: block;
    line-height: 1.6;
    font-weight: 500;
}

/* Kamera değiştirme butonu */
#switch-camera {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#switch-camera:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#switch-camera:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* QR okuyucu container */
.qr-reader-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.qr-reader-container button {
    margin: 5px;
}

/* QR okuyucu alanı */
#qr-reader {
    border: 3px solid #4CAF50;
    border-radius: 12px;
    margin: 15px auto;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#qr-reader video {
    border-radius: 9px;
    width: 100%;
    height: auto;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .qr-reader-container {
        margin: 10px 0;
        padding: 15px;
    }

    #qr-reader {
        max-width: 100%;
        margin: 10px auto;
    }

    .camera-info {
        margin: 8px 0;
        padding: 10px;
    }
}
/* Mevcut CSS'e eklenecek */

.device-info {
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    background: #f0f8ff;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.camera-controls {
    text-align: center;
    margin: 10px 0;
}

.camera-controls button {
    margin: 5px;
}

.active-count {
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    background: #e8f5e8;
    border-radius: 5px;
    color: #2e7d32;
}

.stats-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}
/* Responsive tasarım */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .camera-controls {
        margin: 8px 0;
    }

    .camera-controls button {
        margin: 3px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .device-info {
        margin: 8px 0;
        padding: 6px;
    }

    .device-info small {
        font-size: 12px;
    }
}

/* Ekstra küçük ekranlar için */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    .camera-controls button {
        display: block;
        width: 100%;
        margin: 5px 0;
        padding: 12px;
    }

    #switch-camera {
        margin-top: 8px;
    }
}

/* Kamera butonları için hover efektleri */
.camera-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.camera-controls button:active {
    transform: translateY(0);
}

/* QR okuyucu için gelişmiş stiller */
#qr-reader {
    position: relative;
    overflow: hidden;
}

#qr-reader video {
    object-fit: cover;
}

/* Kamera bilgisi animasyonu */
.camera-info {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert mesajları için gelişmiş stiller */
.alert {
    animation: fadeIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Başarı mesajı için özel stil */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
    color: #856404;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

/* Aktif personel listesi için gelişmiş stiller */
.active-person {
    transition: all 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.active-person:hover {
    background: #f0f8ff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Kayıt listesi için gelişmiş stiller */
.record-item {
    transition: all 0.3s ease;
    border-left: 4px solid #2196F3;
}

.record-item:hover {
    background: #f8f9fa;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Çalışıyor durumu için animasyon */
.working {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Status indicator için animasyon */
.status-indicator {
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.5;
    }
}

/* Form elemanları için gelişmiş stiller */
#qr_code {
    transition: all 0.3s ease;
}

#qr_code:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
}

/* Butonlar için gelişmiş hover efektleri */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Dark mode desteği (isteğe bağlı) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .container {
        background: #2d2d2d;
        border-color: #444;
    }

    .qr-reader-container,
    .stats-section {
        background: #333;
        border-color: #555;
    }

    .stat-item {
        background: #2d2d2d;
        border-color: #4CAF50;
    }
    .active-count {
        background: #2d4a2d;
    }
}

/* Print stilleri */
@media print {

    .camera-controls,
    .qr-reader-container,
    .manual-input {
        display: none;
    }

    .container {
        box-shadow: none;
        border: none;
    }

    .alert {
        border: 1px solid #ccc;
    }
}