/* Basic styling for the perspective correction interface */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.version-info {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.version-info small {
    font-family: monospace;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

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

.image-container {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

#imageCanvas {
    border: 2px solid #ddd;
    border-radius: 4px;
    max-width: 100%;
    cursor: crosshair;
}

.point-counter {
    margin-top: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.controls {
    text-align: center;
    margin-top: 20px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 10px;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#resetBtn {
    background: #e74c3c;
}

#resetBtn:hover {
    background: #c0392b;
}

#downloadBtn {
    background: #27ae60;
}

#downloadBtn:hover {
    background: #229954;
}

input[type="file"] {
    margin: 20px 0;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    width: 100%;
}

.result-container img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.point-list {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.point-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.point-item:last-child {
    border-bottom: none;
}

.point-label {
    font-weight: bold;
    color: #495057;
    min-width: 120px;
}

.point-coords {
    font-family: monospace;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.point-actions {
    margin-top: 10px;
    text-align: center;
}

.point-actions .btn {
    margin: 0 5px;
}
