/* Wine Catalog Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #2c1810 0%, #4a1c1c 50%, #6b2c2c 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px 0;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 50%, #DC143C 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.header-admin-link {
    position: absolute;
    bottom: 15px;
    right: 20px;
}

.admin-link {
    color: white !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.3s ease;
}

.admin-link:hover {
    color: white !important;
    text-decoration: underline !important;
}

.admin-link:visited {
    color: white !important;
}

.admin-link:active {
    color: white !important;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 0;
    flex: 1;
}

.header h1 a {
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.header h1 a:hover {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.header-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Search and Actions */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.2);
    margin-bottom: 30px;
    border: 1px solid rgba(139, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.search-form input,
.search-form select {
    padding: 8px 12px;
    border: 2px solid #CD5C5C;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    transition: all 0.3s ease;
    min-width: 120px;
    max-width: 150px;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.15);
}

.search-form input {
    flex: 1;
    min-width: 180px;
    max-width: 200px;
}

.search-form select {
    cursor: pointer;
}

.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.3);
    background: white;
}

.search-form select:hover {
    border-color: #8B0000;
}

.search-form .btn {
    white-space: nowrap;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
}

.search-actions {
    text-align: center;
    margin: 20px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 50%, #DC143C 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.5);
    background: linear-gradient(135deg, #A52A2A 0%, #DC143C 50%, #FF6347 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6B5B95 0%, #8B7D9B 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #8B7D9B 0%, #A8A8A8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 91, 149, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #32CD32 0%, #90EE90 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #B22222 0%, #DC143C 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC143C 0%, #FF6347 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(178, 34, 34, 0.4);
}

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

.btn-outline:hover {
    background: #8B0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

/* Wine Grid */
.wine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.wine-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.wine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
    border-color: rgba(139, 0, 0, 0.4);
}

.wine-card-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wine-image-container {
    flex-shrink: 0;
}

.wine-image-small {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.wine-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 5px;
}

.wine-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.wine-info {
    flex: 1;
    min-width: 0;
}

.wine-details {
    margin-bottom: 8px;
}

.wine-details p {
    margin-bottom: 4px;
    color: #6c757d;
}

.wine-details strong {
    color: #495057;
    font-weight: 600;
}

.wine-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.wine-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 15px;
    font-size: 14px;
}

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #CD5C5C;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.15);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.3);
    background: white;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Grape Selection */
.grape-tags-container {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.selected-grapes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.grape-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.grape-tag .remove-grape {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 5px;
}

.grape-selection {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.grape-selection select {
    flex: 1;
    min-width: 150px;
}

.grape-selection input[type="number"] {
    width: 80px;
}

/* File Upload */
.file-upload {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #667eea;
}

.file-upload input[type="file"] {
    margin: 10px 0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* No Wines */
.no-wines {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.no-wines h3 {
    color: #6c757d;
    margin-bottom: 15px;
}

.no-wines p {
    color: #adb5bd;
    margin-bottom: 30px;
}

/* View Wine Page Mobile Layout */
@media (max-width: 768px) {
    .form-container > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .form-container > div > div:first-child {
        order: 1;
    }
    
    .form-container > div > div:last-child {
        order: 2;
    }
    
    .form-container h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .form-container h4 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .form-container img {
        height: 200px !important;
    }
    
    .form-container .wine-info {
        padding: 15px;
    }
    
    .form-container .wine-info h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .form-container .wine-info p {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
}

/* Image Upload Styles */
.current-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.file-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
    font-size: 1em;
    color: #2c3e50;
    margin: 0;
    padding: 10px 0;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #CD5C5C !important;
    border-radius: 8px !important;
    margin-right: 15px !important;
    position: relative;
    background: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: inline-block !important;
    min-width: 24px !important;
    min-height: 24px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.15) !important;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%) !important;
    border-color: #228B22 !important;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3) !important;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.checkbox-label:hover .checkmark {
    border-color: #8B0000 !important;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.25) !important;
}

/* Grape Links */
.grape-link {
    color: #8B0000 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.grape-link:hover {
    color: #DC143C !important;
    text-shadow: 0 0 5px rgba(220, 20, 60, 0.3);
    transform: scale(1.05);
}

/* Grape Links in View Wine - Keep white text */
.view-wine .grape-link {
    color: white !important;
}

.view-wine .grape-link:hover {
    color: white !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Edit Wine Page Mobile Layout */
@media (max-width: 768px) {
    .form-container {
        padding: 15px;
    }
    
    .form-container h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .image-upload-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .current-image,
    .preview-image {
        height: 150px !important;
    }
    
    .grape-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .grape-selection select,
    .grape-selection input {
        width: 100%;
    }
    
    .grape-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .grape-item input {
        width: 100%;
    }
    
    .grape-item .remove-grape {
        width: 100%;
        margin-top: 5px;
    }
    
    .form-container > div:last-child {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-container > div:last-child .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9em;
    }
    
    .checkbox-label {
        font-size: 1.1em;
        padding: 15px 0;
    }
    
    .checkmark {
        width: 28px !important;
        height: 28px !important;
        margin-right: 18px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }
    
    .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
        font-size: 18px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2px;
    }
    
    .header {
        margin-bottom: 8px;
        padding: 8px 0;
    }
    
    .header h1 {
        font-size: 1.1em;
        margin-bottom: 0;
    }
    
    .header-admin-link {
        position: absolute;
        bottom: 10px;
        right: 15px;
    }
    
    .admin-link {
        color: white !important;
        text-decoration: none !important;
        font-size: 13px;
        font-weight: normal;
    }
    
    .admin-link:hover {
        color: white !important;
        text-decoration: underline !important;
    }
    
    .admin-link:visited {
        color: white !important;
    }
    
    .admin-link:active {
        color: white !important;
    }
    
    .header-buttons {
        gap: 4px;
        order: 3;
    }
    
    .header-buttons .btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }
    
    .search-container {
        padding: 6px;
        margin-bottom: 8px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 4px;
    }
    
    .search-form input,
    .search-form select {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 4px 6px;
        font-size: 0.75em;
        height: 32px;
    }
    
    .search-form .btn {
        padding: 4px 8px;
        font-size: 0.7em;
        height: 32px;
    }
    
    .wine-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .wine-card {
        padding: 10px;
    }
    
    .wine-card-content {
        gap: 8px;
    }
    
    .wine-image-small {
        width: 80px;
        height: 100px;
    }
    
    .wine-name {
        font-size: 1em;
    }
    
    .wine-actions {
        flex-direction: row;
        gap: 8px;
    }
    
    .wine-actions .btn {
        flex: none;
        padding: 3px 6px;
        font-size: 0.7em;
    }
    
    .grape-selection {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grape-selection select,
    .grape-selection input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 12px 0;
        margin-bottom: 12px;
    }
    
    .header h1 {
        font-size: 1.3em;
        margin-bottom: 0;
    }
    
    .admin-link {
        color: white !important;
        text-decoration: none !important;
        font-size: 12px;
        font-weight: normal;
    }
    
    .admin-link:hover {
        color: white !important;
        text-decoration: underline !important;
    }
    
    .admin-link:visited {
        color: white !important;
    }
    
    .admin-link:active {
        color: white !important;
    }
    
    .header-buttons .btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .search-container {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .search-form input,
    .search-form select {
        padding: 8px 12px;
        font-size: 0.9em;
        height: 40px;
        max-width: none;
    }
    
    .search-form .btn {
        padding: 6px 10px;
        font-size: 0.8em;
        height: 40px;
    }
    
    .wine-card {
        padding: 10px;
    }
    
    .wine-card-content {
        gap: 10px;
    }
    
    .wine-image-small {
        width: 90px;
        height: 110px;
    }
    
    .wine-name {
        font-size: 1.1em;
    }
    
    .wine-actions .btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* iPhone 13 specific optimization (390px) */
@media (max-width: 390px) {
    .container {
        padding: 6px;
    }
    
    .header {
        padding: 10px 0;
        margin-bottom: 10px;
    }
    
    .header h1 {
        font-size: 1.2em;
        margin-bottom: 6px;
    }
    
    .header-buttons .btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }
    
    .search-container {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .search-form input,
    .search-form select {
        padding: 6px 10px;
        font-size: 0.85em;
        height: 36px;
        max-width: none;
    }
    
    .search-form .btn {
        padding: 5px 8px;
        font-size: 0.75em;
        height: 36px;
    }
    
    .wine-card {
        padding: 10px;
    }
    
    .wine-card-content {
        gap: 10px;
    }
    
    .wine-image-small {
        width: 80px;
        height: 100px;
    }
    
    .wine-name {
        font-size: 1em;
    }
    
    .wine-actions .btn {
        padding: 5px 8px;
        font-size: 0.75em;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1em;
    }
    
    .admin-link {
        color: white !important;
        text-decoration: none !important;
        font-size: 11px;
        font-weight: normal;
    }
    
    .admin-link:hover {
        color: white !important;
        text-decoration: underline !important;
    }
    
    .admin-link:visited {
        color: white !important;
    }
    
    .admin-link:active {
        color: white !important;
    }
    
    .header-buttons .btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }
    
    .search-form input,
    .search-form select {
        font-size: 0.8em;
        height: 32px;
    }
    
    .search-form .btn {
        padding: 4px 6px;
        font-size: 0.7em;
        height: 32px;
    }
    
    .wine-card-content {
        gap: 8px;
    }
    
    .wine-image-small {
        width: 70px;
        height: 90px;
    }
    
    .wine-name {
        font-size: 0.9em;
    }
    
    .wine-actions .btn {
        font-size: 0.7em;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    .pagination-info {
        font-size: 0.9em;
        padding: 0 10px;
    }
}

/* Pagination */
.pagination-container {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.2);
    border: 1px solid rgba(139, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.pagination-btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 50%, #DC143C 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-btn:hover {
    background: linear-gradient(135deg, #A52A2A 0%, #DC143C 50%, #FF6347 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
    color: white;
    text-decoration: none;
}

.pagination-info {
    color: #2c3e50;
    font-weight: 500;
    font-size: 16px;
    padding: 0 15px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Image Lightbox */
.image-lightbox {
    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;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ccc;
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Wine card images on index page */
.wine-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.wine-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* List Management Styles */
.list-container {
    margin-bottom: 20px;
}

.list-items {
    margin-bottom: 20px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.list-item:hover {
    background: #e9ecef;
    border-color: #8B0000;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.1);
}

.item-name {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-url {
    font-size: 0.9em;
    color: #6c757d;
}

.url-link {
    color: #8B0000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.url-link:hover {
    color: #DC143C;
}

.item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-item-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.add-item-form input {
    flex: 1;
    min-width: 200px;
}

/* Small button styles */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    margin: 0 !important;
    white-space: nowrap;
    min-width: auto;
    height: auto;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive styles for list items */
@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }
    
    .item-info {
        order: 1;
        margin-bottom: 10px;
    }
    
    .item-name {
        font-size: 1.1em;
        margin-bottom: 5px;
    }
    
    .item-url {
        font-size: 0.8em;
        word-break: break-all;
        line-height: 1.4;
    }
    
    .url-link {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .item-actions {
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .item-actions .btn-sm {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .list-item {
        padding: 12px;
    }
    
    .item-name {
        font-size: 1em;
    }
    
    .item-url {
        font-size: 0.75em;
    }
    
    .item-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .item-actions .btn-sm {
        width: 100%;
        max-width: none;
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Mobile-specific styles for manage_lists.php */
@media (max-width: 768px) {
    .form-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .form-container h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .add-item-form {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .add-item-form input {
        width: 100%;
        min-width: auto;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .add-item-form button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Special handling for grape form with URL input */
    .add-item-form div {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .add-item-form div input {
        width: 100% !important;
        min-width: auto !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .form-container {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .form-container h2 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .add-item-form {
        padding: 10px;
    }
    
    .add-item-form input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .add-item-form button {
        padding: 10px;
        font-size: 13px;
    }
    
    .list-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .item-name {
        font-size: 0.95em;
    }
    
    .item-url {
        font-size: 0.7em;
    }
    
    .item-actions .btn-sm {
        padding: 6px 10px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 5px;
    }
    
    .form-container {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .form-container h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .add-item-form {
        padding: 8px;
    }
    
    .add-item-form input {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .add-item-form button {
        padding: 8px;
        font-size: 12px;
    }
    
    .list-item {
        padding: 8px;
        margin-bottom: 5px;
    }
    
    .item-name {
        font-size: 0.9em;
    }
    
    .item-url {
        font-size: 0.65em;
    }
    
    .item-actions .btn-sm {
        padding: 5px 8px;
        font-size: 9px;
    }
}


/* Heart preference icons - ensure proper colors on all devices */
.preference-heart {
    font-size: 20px !important;
    text-shadow: 0 0 3px rgba(0,0,0,0.5) !important;
    display: inline-block !important;
    line-height: 1 !important;
    font-weight: bold !important;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5)) !important;
}

.preference-heart.daniel {
    color: #28a745 !important;
    background: transparent !important;
    text-shadow: 0 0 3px rgba(40, 167, 69, 0.8) !important;
    filter: drop-shadow(0 0 3px rgba(40, 167, 69, 0.8)) !important;
}

.preference-heart.jenny {
    color: #007bff !important;
    background: transparent !important;
    text-shadow: 0 0 3px rgba(0, 123, 255, 0.8) !important;
    filter: drop-shadow(0 0 3px rgba(0, 123, 255, 0.8)) !important;
}

/* Mobile-specific heart styling */
@media (max-width: 768px) {
    .preference-heart {
        font-size: 24px !important;
        text-shadow: 0 0 4px rgba(0,0,0,0.7) !important;
        filter: drop-shadow(0 0 4px rgba(0,0,0,0.7)) !important;
    }
    
    .preference-heart.daniel {
        color: #28a745 !important;
        background: transparent !important;
        text-shadow: 0 0 4px rgba(40, 167, 69, 1) !important;
        filter: drop-shadow(0 0 4px rgba(40, 167, 69, 1)) !important;
    }
    
    .preference-heart.jenny {
        color: #007bff !important;
        background: transparent !important;
        text-shadow: 0 0 4px rgba(0, 123, 255, 1) !important;
        filter: drop-shadow(0 0 4px rgba(0, 123, 255, 1)) !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.wine-card {
    animation: fadeIn 0.5s ease-out;
}
