* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #ff9ecf 0%, #ffc0e8 50%, #ffe0f0 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Navigation */
.main-nav {
    background: white;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.15);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #d63384;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #c2185b;
    font-weight: 500;
    font-size: 0.95em;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

h1 {
    font-size: 3.5em;
    color: #d63384;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(214, 51, 132, 0.3);
}

.subtitle {
    font-size: 1.3em;
    color: #c2185b;
    font-weight: 300;
}

/* Home Page Styles */
.home-content {
    max-width: 1000px;
    margin: 0 auto;
}

.home-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.2);
    text-align: center;
}

.home-card h2 {
    color: #d63384;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.home-description {
    font-size: 1.2em;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(214, 51, 132, 0.3);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #d63384;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    font-size: 1em;
}

.cta-section {
    text-align: center;
    margin-top: 40px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.3em;
    text-decoration: none;
    display: inline-block;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(214, 51, 132, 0.4);
}

/* Form Styles */
.add-review-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.2);
}

.add-review-section h2 {
    color: #d63384;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    color: #c2185b;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

input[type="text"],
input[type="date"],
textarea,
select {
    padding: 12px;
    border: 2px solid #ffc0e8;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stars-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.star-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #d63384;
    cursor: pointer;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #d63384 0%, #ff6b9d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #ffc0e8;
    color: #c2185b;
}

.btn-secondary:hover {
    background: #ffb0d8;
}

.btn-danger {
    background: #ff6b9d;
    color: white;
}

.btn-danger:hover {
    background: #ff4d7d;
}

.btn-edit {
    background: #ffc0e8;
    color: #c2185b;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-edit:hover {
    background: #ffb0d8;
}

/* Table Styles */
.reviews-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.2);
}

.reviews-section h2 {
    color: #d63384;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background: linear-gradient(135deg, #ff9ecf 0%, #ffc0e8 100%);
}

th {
    padding: 15px;
    text-align: left;
    color: #c2185b;
    font-weight: 600;
    font-size: 1em;
}

td {
    padding: 15px;
    border-bottom: 1px solid #ffe0f0;
}

tbody tr:hover {
    background: #fff5f9;
}

tbody tr:last-child td {
    border-bottom: none;
}

.stars-display {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 1.2em;
    color: #ffd700;
}

.star.empty {
    color: #ffc0e8;
}

.notes-cell {
    max-width: 300px;
    word-wrap: break-word;
}

.actions-cell {
    display: flex;
    gap: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #d63384;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: rotate(90deg);
}

/* Loading and Messages */
.loading {
    text-align: center;
    padding: 40px;
    color: #c2185b;
    font-size: 1.2em;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #c2185b;
}

.empty-state p {
    font-size: 1.2em;
    margin-top: 10px;
}

.message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

/* Card Layout for Mobile */
.reviews-cards {
    display: none;
}

.review-card {
    background: #fff5f9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #ffc0e8;
    box-shadow: 0 4px 10px rgba(214, 51, 132, 0.1);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.review-card-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #d63384;
    flex: 1;
    min-width: 200px;
}

.review-card-date {
    color: #c2185b;
    font-size: 0.9em;
    font-weight: 500;
}

.review-card-field {
    margin-bottom: 12px;
}

.review-card-label {
    font-weight: 600;
    color: #c2185b;
    font-size: 0.9em;
    margin-bottom: 5px;
    display: block;
}

.review-card-value {
    color: #333;
    word-wrap: break-word;
}

.review-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ffc0e8;
}

.review-card-actions .btn {
    flex: 1;
    min-height: 44px; /* Touch target size */
    font-size: 0.95em;
}

.review-card .stars-display {
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    header {
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .main-nav {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .nav-actions .btn {
        width: 100%;
    }
    
    .user-info {
        text-align: center;
        width: 100%;
    }
    
    .home-card {
        padding: 25px 20px;
    }
    
    .home-card h2 {
        font-size: 1.8em;
    }
    
    .home-description {
        font-size: 1.1em;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 2.5em;
    }
    
    .btn-large {
        padding: 16px 30px;
        font-size: 1.1em;
        width: 100%;
    }
    
    .add-review-section,
    .reviews-section {
        padding: 20px;
        border-radius: 15px;
    }
    
    .add-review-section h2,
    .reviews-section h2 {
        font-size: 1.5em;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stars-input {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .star-option {
        flex: 1;
        min-width: 60px;
    }
    
    input[type="radio"] {
        width: 24px;
        height: 24px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 1em;
        min-height: 44px; /* Touch target size */
        width: 100%;
    }
    
    .btn-primary,
    .btn-secondary {
        margin-bottom: 10px;
    }
    
    /* Hide table on mobile, show cards */
    .table-container {
        display: none;
    }
    
    .reviews-cards {
        display: block;
    }
    
    /* Improve form button layout */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    textarea {
        min-height: 120px;
    }
    
    input[type="text"],
    input[type="date"],
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }
    
    label {
        font-size: 1em;
    }
    
    .review-card {
        padding: 15px;
    }
    
    .review-card-title {
        font-size: 1.2em;
    }
}

/* Tablet and smaller desktop */
@media (min-width: 769px) and (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 800px;
    }
    
    th, td {
        padding: 12px 10px;
        font-size: 0.95em;
    }
    
    .notes-cell {
        max-width: 250px;
    }
}

/* Desktop - show table, hide cards */
@media (min-width: 769px) {
    .reviews-cards {
        display: none;
    }
    
    .table-container {
        display: block;
    }
}
