/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy-blue: #001f3f;
    --yellow: #FFD700;
    --light-grey: #f5f5f5;
    --dark-grey: #666;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-grey);
    color: var(--navy-blue);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--yellow);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--yellow);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-title {
    color: var(--navy-blue);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--yellow);
    padding-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--navy-blue);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--dark-grey);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--yellow);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--yellow);
    color: var(--navy-blue);
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--navy-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #003366;
}

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Rank #1 Card - Full Width */
.ranked-card-1 {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 3px solid var(--yellow);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ranked-card-1:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Ranked Survey Grid - 2 per row */
.survey-grid-ranked-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.survey-card-ranked {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.survey-card-ranked:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Survey Grid - 3 per row (unranked) */
.survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.survey-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.survey-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.survey-info {
    padding: 1.5rem;
}

.survey-title {
    color: var(--navy-blue);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Star Rating Display */
.star-rating {
    color: #FFA500;
    font-size: 1.2rem;
}

.star-rating-input {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    cursor: pointer;
}

.star-rating-input span {
    color: #ddd;
    transition: color 0.2s;
}

.star-rating-input span:hover,
.star-rating-input span.active {
    color: #FFA500;
}

/* Review Section */
.review-item {
    background: var(--white);
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--navy-blue);
    font-size: 1.2rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 1rem;
    text-align: left;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-grey);
}

tr:hover {
    background-color: var(--light-grey);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

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

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

.alert-info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Payment Info */
.payment-box {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    border: 3px solid var(--yellow);
}

.payment-amount {
    font-size: 2.5rem;
    color: var(--navy-blue);
    font-weight: bold;
    margin: 1rem 0;
}

.qr-code {
    max-width: 300px;
    margin: 1.5rem auto;
    display: block;
}

/* Footer */
footer {
    background-color: var(--navy-blue);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .survey-grid {
        grid-template-columns: 1fr;
    }
    
    .survey-grid-ranked-2 {
        grid-template-columns: 1fr;
    }
    
    .ranked-card-1 > div {
        grid-template-columns: 1fr !important;
    }
    
    .ranked-card-1 img {
        height: 200px !important;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .star-rating-input {
        font-size: 1.5rem;
    }
}