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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
    min-height: 500px;
}

.scanner-section {
    display: flex;
    flex-direction: column;
}

.scanner-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#video {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    border-radius: 15px;
    background: #f0f0f0;
    flex: 1;
}

.scanner-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 80px;
    pointer-events: none;
}

.scanner-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #667eea;
}

.corner.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

.scanner-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

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

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-sms {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-sms:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.results-section {
    display: flex;
    flex-direction: column;
}

.result-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-container h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.result-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.placeholder-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #6c757d;
}

.placeholder-message svg {
    opacity: 0.5;
}

.placeholder-message p {
    font-size: 1.1rem;
    margin: 0;
}

.result-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-content p {
    word-break: break-all;
    margin-bottom: 15px;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.error-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #dc3545;
}

.error-message svg {
    flex-shrink: 0;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .app-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scanner-container {
        min-height: 300px;
    }
    
    #video {
        height: 250px;
        min-height: 250px;
    }
    
    .scanner-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-content {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    #video {
        height: 200px;
    }
    
    .scanner-container {
        padding: 15px;
    }
    
    .corner {
        width: 25px;
        height: 25px;
    }
}

/* Success animation */
@keyframes success {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success {
    animation: success 0.5s ease-out;
} 