:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --success: #27ae60;
}

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

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

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

header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    header h1 { font-size: 1.8rem; }
}

/* Form style */
.form-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Search button */
.btn-search {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-search:hover {
    background-color: #2980b9;
}

/* Map section */
.map-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

#map {
    height: 400px;
    width: 100%;
}

/* Results section */
.results-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.results-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.stations-list {
    display: grid;
    gap: 20px;
}

.station-card {
    padding: 20px;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    background: #fafafa;
    transition: transform 0.2s, box-shadow 0.2s;
}

.station-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.station-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.station-name {
    font-weight: 600;
    color: var(--primary-color);
}

.station-address {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.station-fuel {
    display: inline-block;
    padding: 3px 8px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.station-price {
    margin-top: 8px;
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Resaltado de la estación más barata de la ruta */
.station-card--mas-barato {
    border-color: var(--success);
    border-left-width: 4px;
    background: #f2fbf5;
}

.badge-mas-barato {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--success);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.route-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Last searches section */
.last-searches {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.last-searches h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.searches-list {
    display: grid;
    gap: 12px;
}

.search-item {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.search-item-details {
    flex: 1;
    min-width: 180px;
}

.search-item .fuel-type {
    font-weight: normal;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.search-item .date {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.no-searches {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Date section */
.date-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.date-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.date-section span {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 8px;
}

/* Responsive design */
@media (max-width: 480px) {
    .container { padding: 10px; }
    
    .station-card { padding: 15px; }
    
    .search-item { flex-direction: column; align-items: flex-start; }
    .search-item .date { margin-top: 8px; }
}