/* Football Card Price Estimator - Mobile Responsive Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5490;
    --secondary-color: #ff6b35;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

header p {
    color: var(--text-light);
    font-size: 16px;
}

main {
    flex: 1;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-content svg {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.upload-content p {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
}

.upload-hint {
    font-size: 14px;
    color: var(--text-light);
}

.image-preview {
    position: relative;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: var(--card-bg);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.remove-image:hover {
    transform: scale(1.1);
}

.detect-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c6aa0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    z-index: 10;
}

.detect-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.detect-button:active {
    transform: translateX(-50%) translateY(0);
}

.detect-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.detect-icon {
    font-size: 16px;
}

.detect-text {
    font-size: 14px;
}

/* Form Styles */
.card-form {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
    background-color: white;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1);
}

.checkbox-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: #144a7a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Suggestions */
.suggestions {
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-color);
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Results */
.results {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.results h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
}

.price-display {
    margin-bottom: 25px;
}

.price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.price-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.price-box.low {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.price-box.high {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.price-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.price-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.estimated-price {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c6aa0 100%);
    border-radius: 8px;
    color: white;
}

.estimated-label {
    display: block;
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.estimated-value {
    display: block;
    font-size: 42px;
    font-weight: 700;
}

.price-details {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.price-details h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.detail-label {
    font-weight: 500;
    color: var(--text-color);
}

.detail-value {
    color: var(--text-light);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    font-style: italic;
}

/* Error Message */
.error-message {
    background-color: #fee;
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
    margin-bottom: 20px;
}

/* Detection Notification */
.detection-notification {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detection-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detection-icon {
    font-size: 24px;
}

.detection-text {
    flex: 1;
    font-size: 14px;
}

.detection-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.confidence {
    opacity: 0.9;
    font-size: 12px;
    font-weight: normal;
}

.detection-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.detection-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 14px;
    margin-top: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .price-range {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .card-form {
        padding: 20px;
    }

    .estimated-value {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    .price-value {
        font-size: 24px;
    }

    .estimated-value {
        font-size: 32px;
    }
}

/* Loading States */
.btn-loader {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

