* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.loading {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.brewery-group {
    border-bottom: 1px solid #eee;
}

.brewery-header {
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.brewery-header:hover {
    background: #e9ecef;
}

.brewery-header.expanded {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.brewery-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.expand-icon {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

.expanded .expand-icon {
    transform: rotate(90deg);
}

.style-content {
    display: none;
    background: white;
}

.style-content.show {
    display: block;
}

.style-group {
    border-bottom: 1px solid #f0f0f0;
}

.style-header {
    padding: 15px 20px 15px 35px;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid #e74c3c;
}

.style-header:hover {
    background: #eeeeee;
}

.style-header.expanded {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.style-name {
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
}

.beer-content {
    display: none;
    background: white;
}

.beer-content.show {
    display: block;
}

.beer-item {
    padding: 15px 20px 15px 50px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.beer-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.beer-item:last-child {
    border-bottom: none;
}

.beer-name {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.modal-header .brewery-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 400;
}

.modal-body {
    padding: 25px;
}

.beer-detail {
    margin-bottom: 15px;
}

.beer-detail label {
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.beer-detail-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.beer-detail-row span {
    font-size: 14px;
    color: #2c3e50;
}

.beer-detail span {
    color: #555;
    font-size: 15px;
}

.order-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.order-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.close {
    color: rgba(255,255,255,0.8);
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: white;
}

/* Order Form Modal */
.order-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-display {
    font-size: 18px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.expand-collapse-controls {
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.error-message {
    background: #fee;
    color: #c0392b;
    padding: 15px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

.success-message {
    background: #e8f5e8;
    color: #27ae60;
    padding: 15px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

/* Tab Styles */
.tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}