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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
}

/* Main Layout */
.main-layout {
    width: 100%;
    height: 100vh;
}

/* Welcome Page */
.welcome-container {
    width: 100%;
    height: 100vh;
    background: url('/images/Background.jpg') center center/cover no-repeat;
    overflow-y: auto;
    position: relative;
}

.no-internet-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ff9800;
    color: #000;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.warning-icon {
    font-size: 20px;
}

.rotate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotate-message {
    text-align: center;
    padding: 40px;
}

.phone-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.rotate-message h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.rotate-message p {
    font-size: 18px;
    opacity: 0.8;
}

.welcome-content {
    max-width: 80%;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.logo {
    max-width: 200px;
    height: auto;
}

.welcome-content h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.info-box {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.info-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box p {
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.9;
}

.btn-next {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn-next.disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Camera Page */
.camera-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    z-index: 1;
}

.camera-view {
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    flex: 1 1 auto;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#cameraStream {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.overlay-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    object-fit: cover;
    z-index: 2;
}

.photo-instructions {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 250px;
    backdrop-filter: blur(10px);
}

.photo-instructions p {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.btn-capture {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: 5px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-capture:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
}

.btn-capture:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.camera-icon {
    display: block;
}

.progress-circle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.btn-settings {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.settings-panel {
    position: absolute;
    top: 150px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #fff;
    border-radius: 12px;
    padding: 20px;
    min-width: 250px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.settings-panel h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.setting-item input[type="range"] {
    width: 100%;
}

.btn-close-settings {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.error-message {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(244, 67, 54, 0.9);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 90%;
    text-align: center;
}

/* Results Page */
.results-container {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-y: auto;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 20px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.results-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
}

.results-content h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.vehicle-info {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.vehicle-info h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.info-row .label {
    font-size: 16px;
    opacity: 0.8;
}

.info-row .value {
    font-size: 18px;
    font-weight: bold;
}

.damage-section {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.damage-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.damage-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.damage-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid;
    padding: 15px;
    border-radius: 8px;
}

.damage-item.severity-high {
    border-left-color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.damage-item.severity-medium {
    border-left-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.damage-item.severity-low {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.damage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.damage-location {
    font-weight: bold;
    font-size: 16px;
}

.damage-severity {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.severity-high .damage-severity {
    background-color: #f44336;
}

.severity-medium .damage-severity {
    background-color: #ff9800;
}

.severity-low .damage-severity {
    background-color: #ffc107;
    color: #000;
}

.damage-description {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

.no-damage {
    background-color: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
}

.check-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.no-damage p {
    font-size: 18px;
    font-weight: bold;
}

.summary-section {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.summary-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.8;
}

.summary-text p {
    margin-bottom: 10px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px;
    text-align: center;
}

.error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.error-container p {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 30px;
}

.btn-retry {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #2196F3;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-retry:hover {
    transform: translateY(-2px);
}

.btn-vehicle-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 160px;
    height: 200px;
    background: transparent;
    border: 3px solid #fff;
    border-radius: 24px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
    padding: 18px 10px 24px 10px;
    box-sizing: border-box;
    outline: none;
}

.btn-vehicle-type.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 0 18px 0 rgba(76, 175, 80, 0.25);
}

.vehicle-type-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 18px;
    margin-top: 18px;
    filter: brightness(0) invert(1) opacity(0.85);
}

.vehicle-type-label {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: auto;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none;
}

.btn-vehicle-type.selected .vehicle-type-label {
    color: #fff;
}

.vehicle-type-buttons {
    display: flex;
    gap: 24px;
    margin-top: 18px;
    justify-content: center;
}

@media (max-width: 768px) {
    .welcome-content {
        padding: 20px 15px;
    }

    .welcome-content h1 {
        font-size: 24px;
    }

    .info-box h3 {
        font-size: 16px;
    }

    .info-box p {
        font-size: 14px;
    }

    .btn-capture {
        right: 20px;
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .photo-instructions {
        left: 10px;
        max-width: 180px;
        padding: 10px 15px;
    }

    .photo-instructions p {
        font-size: 12px;
    }

    .btn-vehicle-type {
        width: 110px;
        height: 140px;
        padding: 10px 4px 14px 4px;
    }
    .vehicle-type-img {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
        margin-top: 10px;
    }
    .vehicle-type-label {
        font-size: 15px;
    }
    .vehicle-type-buttons {
        gap: 10px;
    }
}
