/* My Bins - Mobile-First Responsive Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background: var(--card-bg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--text-light);
    font-size: 0.95rem;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* Main Content */
main {
    flex: 1;
    padding: 1.5rem;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.action-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .action-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:active {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .btn {
        width: auto;
    }
}

/* Form Styles */
.form-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-container h2 {
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-info {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.description-textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload Styles */
.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.file-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.file-button:hover {
    background: #475569;
}

.file-name {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Info Section */
.info-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.info-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.steps {
    list-style-position: inside;
    color: var(--text-light);
}

.steps li {
    padding: 0.5rem 0;
}

/* Bin Page Styles */
.bin-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.bin-id {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

/* Message Styles */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.bin-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.bin-image:hover {
    transform: scale(1.05);
}

.btn-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: rgba(220, 38, 38, 1);
}

.no-images {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-style: italic;
}

/* QR Code Display */
.qr-card {
    text-align: center;
}

.qr-display {
    padding: 1rem;
}

.qr-display img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

.qr-hint {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    main {
        padding: 2rem;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Large Screens */
@media (min-width: 1024px) {
    header {
        padding: 2rem;
    }
    
    header h1 {
        font-size: 2.25rem;
    }
    
    main {
        padding: 3rem;
    }
}
