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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin: 0;
}

.navigation {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.capture-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.input-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
}

.actions {
    margin-bottom: 25px;
    text-align: center;
}

.camera-container {
    text-align: center;
    margin-bottom: 25px;
}

.camera-container video {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    background: #000;
}

/* iOS-specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .camera-container video {
        /* Better iOS video rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* iOS Safari specific */
@supports (-webkit-touch-callout: none) {
    .camera-container video {
        /* Prevent iOS zoom on video tap */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .btn {
        /* Better iOS button tap response */
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        touch-action: manipulation;
    }
}

.camera-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.control-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.control-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    transition: border-color 0.3s;
}

.control-select:focus {
    outline: none;
    border-color: #3498db;
}

.location-info {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-family: monospace;
    color: #2c3e50;
    text-align: center;
}

.entries-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.entries-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.entries-grid {
    display: grid;
    gap: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    font-weight: 600;
}

.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);
}

img {
    margin-top: 10px;
    max-width: 100%;
}

.entry {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.entry h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.entry p {
    margin-bottom: 8px;
    color: #666;
}

.entry img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.entry img:hover {
    transform: scale(1.02);
}

.permissions-info {
    background: #e8f4f8;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.permissions-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.permissions-info p {
    margin-bottom: 8px;
    color: #2c3e50;
}

.permissions-info ul {
    margin-left: 20px;
    color: #2c3e50;
}

.permissions-info li {
    margin-bottom: 5px;
}

/* Show permissions info when it has content */
.permissions-info:not(:empty) {
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .page-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
    
    .navigation {
        justify-content: center;
    }
    
    .btn {
        display: block;
        margin: 10px auto;
        width: 100%;
        max-width: 300px;
    }
    
    .camera-container video {
        max-width: 100%;
    }
}
