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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333333;
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 65, 108, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    color: #ff416c;
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(255, 65, 108, 0.2);
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

header h1 i {
    margin-right: 20px;
    color: #ff416c;
    filter: drop-shadow(0 2px 10px rgba(255, 65, 108, 0.2));
}

.main-content {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Glass morphism card styles */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 65, 108, 0.1);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 
        0 8px 32px rgba(255, 65, 108, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 65, 108, 0.3), transparent);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(255, 65, 108, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 65, 108, 0.2);
}

.status-card {
    grid-column: span 2;
}

.periods-card {
    grid-column: span 2;
}

/* Card Headers */
h2 {
    color: #ff416c;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.1);
}

h2 i {
    margin-right: 15px;
    color: #ff416c;
    font-size: 1.6rem;
}

/* Odometer Section */
.odometer-section {
    text-align: center;
    margin-bottom: 35px;
}

.odometer-display {
    background: linear-gradient(135deg, #ff416c, #ff4757);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 65, 108, 0.2);
    color: white;
    padding: 30px;
    border-radius: 20px;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 
        0 8px 25px rgba(255, 65, 108, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.odometer-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.km-value {
    text-align: center;
    font-size: 4rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.km-unit {
    font-size: 1.4rem;
    margin-left: 8px;
    opacity: 0.9;
    font-weight: 500;
}

/* Update Section */
.update-section {
    border-top: 1px solid rgba(255, 65, 108, 0.1);
    padding-top: 25px;
}

.update-section h3 {
    color: #333333;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.3rem;
}

.update-form {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.update-form input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid rgba(255, 65, 108, 0.2);
    border-radius: 12px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333333;
    transition: all 0.3s ease;
}

.update-form input::placeholder {
    color: rgba(51, 51, 51, 0.6);
}

.update-form input:focus {
    outline: none;
    border-color: #ff416c;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 65, 108, 0.1);
}

.update-form button {
    background: linear-gradient(135deg, #ff416c, #ff4757);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 65, 108, 0.2);
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.update-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.update-form button:hover::before {
    left: 100%;
}

.update-form button:hover {
    background: linear-gradient(135deg, #ff2f2f, #e55039);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 65, 108, 0.3);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 65, 108, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: inset 0 2px 4px rgba(255, 65, 108, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff416c, #ff4757);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.m-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    position: relative;
}
.p-m-info-1 {
    position: absolute;
    top: 25%;
    transform: translateY(-50%); /* Moves the element up by half its height */
    text-align: center;
    font-weight: 350;
    color: #eb4f74;
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.2);
    padding: 5px;
}

.p-m-info-2 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Moves the element up by half its height */
    text-align: center;
    font-weight: 350;
    color: #eb4f74;
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.2);
    padding: 5px;
}

.p-m-info-3 {
    position: absolute;
    top: 75%;
    transform: translateY(-50%); /* Moves the element up by half its height */
    text-align: center;
    font-weight: 350;
    color: #eb4f74;
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.2);
    padding: 5px;
}

.m-info-title {
    font-weight: 700;
    color: #ff416c;
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.2);
}

/* Next Maintenance */
.next-maintenance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 65, 108, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 65, 108, 0.1);
    position: relative;
    overflow: hidden;
}

.next-maintenance-info::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff416c, #ff4757);
}

.period-badge {
    background: linear-gradient(135deg, #ff416c, #ff4757);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255, 65, 108, 0.2);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.km-info {
    text-align: right;
}

.target-km {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #ff416c;
    text-shadow: 0 2px 10px rgba(255, 65, 108, 0.2);
}

.remaining-km {
    font-size: 1rem;
    color: #666666;
    font-weight: 500;
}

/* Completion Card */
.completion-card {
    text-align: center;
    background: rgba(76, 175, 80, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.completion-card h2 {
    color: #4caf50;
}

.completion-card h2 i {
    color: #4caf50;
}

.completion-card p {
    color: #333333;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Periods Grid */
.periods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.period-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 65, 108, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.period-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 65, 108, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.period-item:hover::before {
    opacity: 1;
}

.period-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.4);
    transform: scale(1.02);
}

.period-item.completed::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.period-item.failed {
    background: rgba(175, 76, 76, 0.1);
    border-color: rgba(175, 76, 76, 0.4);
    transform: scale(1.02);
}

.period-item.failed::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #af4c4c;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(175, 76, 76, 0.4);
}

.period-item.pending {
    background: rgba(255, 255, 255, 0.8);
}

.period-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 65, 108, 0.15);
    border-color: rgba(255, 65, 108, 0.2);
}

.period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.period-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.info-icon {
    font-size: 1.1rem;
    color: #ff416c;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 50%;
    background: rgba(255, 65, 108, 0.1);
}

.info-icon:hover {
    color: #ff2f2f;
    background: rgba(255, 65, 108, 0.2);
    transform: scale(1.1);
}

.period-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333333;
}

.period-icons i:not(.info-icon) {
    font-size: 1.3rem;
    color: #666666;
}

.period-item.completed .period-icons i:not(.info-icon) {
    color: #4caf50;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 250ms ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(255, 65, 108, 0.2);
    border: 2px solid rgba(255, 65, 108, 0.1);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #ff416c, #ff4757);
    color: white;
    padding: 25px 30px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-button {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.maintenance-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.maintenance-list li {
    color: #333333;
    font-size: 1rem;
    margin-bottom: 12px;
    padding: 12px 15px;
    background: rgba(255, 65, 108, 0.05);
    border-radius: 10px;
    border-left: 4px solid #ff416c;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.maintenance-list li:hover {
    background: rgba(255, 65, 108, 0.1);
    transform: translateX(5px);
}

.maintenance-list li::before {
    content: '✓';
    color: #4caf50;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.1rem;
}

.cost-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.cost-list li {
    color: #333333;
    font-size: 1rem;
    margin-bottom: 12px;
    padding: 10px 10px;
    background: rgba(255, 65, 109, 0.132);
    border-radius: 10px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.cost-list li:hover {
    background: rgba(255, 65, 103, 0.851);
    transform: translateX(5px);
}

.cost-info {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.1), rgba(255, 71, 87, 0.1));
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 65, 108, 0.2);
}

.cost-info strong {
    color: #ff416c;
    font-size: 1.2rem;
    font-weight: 700;
}

.period-info {
    background: rgba(255, 65, 108, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #ff416c;
}

.period-info h4 {
    color: #ff416c;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.period-info p {
    color: #666666;
    margin: 0;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.period-km {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #ff416c;
}

.period-status {
    font-size: 1rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.period-item.completed .period-status {
    color: #4caf50;
}

/* Promotion Section */
.promotion-section {
    margin-top: 25px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.promotion-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffc107, #ff9800, #ffc107);
    animation: shimmer 2s ease-in-out infinite;
}

.promotion-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #ff9800;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promotion-header i {
    color: #ffc107;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

.promotion-content h3 {
    color: #ff9800;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(255, 152, 0, 0.2);
}

.promotion-content p {
    text-align: center;
    color: #333333;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.promotion-content strong {
    color: #ff9800;
    font-weight: 800;
    font-size: 1.2em;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333333;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.feature-item i {
    color: #4caf50;
    font-size: 1rem;
}

.promotion-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.promo-button {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.promo-button.primary {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.promo-button.primary:hover {
    background: linear-gradient(135deg, #f57c00, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.promo-button.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #ff9800;
    border: 2px solid #ff9800;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.1);
}

.promo-button.secondary:hover {
    background: #ff9800;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
}

.promo-code {
    text-align: center;
    padding: 12px 20px;
    background: rgba(255, 193, 7, 0.2);
    border: 1px dashed #ffc107;
    border-radius: 8px;
    color: #333333;
    font-size: 1rem;
}

.promo-code strong {
    color: #ff9800;
    font-weight: 800;
    font-size: 1.1em;
    letter-spacing: 1px;
}


/* Message Styles */
.message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid;
    color: white;
}

.message.success {
    background: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.message.error {
    background: #f44336;
    border-color: rgba(244, 67, 54, 0.3);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 2.8rem;
    }
    
    .main-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .status-card,
    .periods-card {
        grid-column: span 1;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .glass-card {
        padding: 25px;
    }
    
    .km-value {
        font-size: 3rem;
    }
    
    .next-maintenance-info {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .periods-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .update-form {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .km-value {
        font-size: 2.5rem;
    }
    
    .periods-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Loading animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.6s ease-out;
}

.glass-card:nth-child(2) { animation-delay: 0.1s; }
.glass-card:nth-child(3) { animation-delay: 0.2s; }
.glass-card:nth-child(4) { animation-delay: 0.3s; }
.glass-card:nth-child(5) { animation-delay: 0.4s; }