/* RunMetrics Pro Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
}

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

.hero {
    text-align: center;
    padding: 50px 0;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffd89b, #19547b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(255,216,155,0.5)); }
    to { filter: drop-shadow(0 0 30px rgba(255,216,155,0.8)); }
}

.hero p {
    font-size: 1.3em;
    opacity: 0.9;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.tab-btn:hover, .tab-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.tab-content {
    display: none;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.metric-card {
    background: rgba(255,255,255,0.15);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.2);
}

.metric-card h3 {
    color: #ffd89b;
    margin-bottom: 15px;
    font-size: 1.4em;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Fix dropdown options styling */
.input-group select option {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border: none;
}

.input-group select option:hover {
    background: #34495e;
    color: #ffd89b;
}

.input-group select option:checked {
    background: #ffd89b;
    color: #2c3e50;
    font-weight: 600;
}

/* Additional dropdown styling for better cross-browser support */
.input-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd89b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* Focus state for select elements */
.input-group select:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 20px rgba(255,216,155,0.5);
    border: 2px solid rgba(255,216,155,0.6);
}

.input-group input::placeholder {
    color: rgba(255,255,255,0.7);
}

.input-group input:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 20px rgba(255,216,155,0.5);
}

.btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(238,90,36,0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(238,90,36,0.4);
}

.results {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #ffd89b;
}

.pace-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.pace-table th, .pace-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.pace-table th {
    background: rgba(0,0,0,0.3);
    color: #ffd89b;
    font-weight: 600;
}

.pace-table tr:hover {
    background: rgba(255,255,255,0.1);
}

.pace-table-container {
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

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

.metric-item {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.2);
    cursor: pointer;
}

.metric-item .icon {
    font-size: 2em;
    margin-bottom: 10px;
    opacity: 0.8;
}

.metric-item h4 {
    color: #ffd89b;
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.2);
    opacity: 0.8;
}

.footer footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 5px;
}

.footer footer a:hover {
    color: #ffd89b;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.training-zones {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.zone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.zone:last-child {
    border-bottom: none;
}

.zone-name {
    font-weight: 600;
    color: #ffd89b;
}

.zone-range {
    background: rgba(0,0,0,0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    
    .container {
        padding: 15px;
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }
    
    .pace-table {
        font-size: 0.9em;
    }
    
    .pace-table th, .pace-table td {
        padding: 8px 10px;
    }
    
    .metric-card {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .container {
        padding: 10px;
    }
    
    .tab-content {
        padding: 20px 15px;
    }
    
    .pace-table {
        font-size: 0.8em;
    }
    
    .metrics-showcase {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 216, 155, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

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

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px 20px 0 0;
}

.popup-header h3 {
    color: #ffd89b;
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: scale(1.1);
}

.popup-body {
    padding: 25px;
}

.popup-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
}

.popup-body h4 {
    color: #ffd89b;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.popup-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

.popup-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.popup-body li {
    margin-bottom: 8px;
    opacity: 0.9;
}

.popup-body strong {
    color: #ffd89b;
}

/* Responsive popup */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-body {
        padding: 20px;
    }
    
    .popup-header h3 {
        font-size: 1.3em;
    }
}

/* Cookie Consent Banner Styles */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    z-index: 1001;
    border-top: 3px solid #ffd89b;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    color: #ffd89b;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.cookie-text p {
    margin-bottom: 10px;
    line-height: 1.5;
    opacity: 0.9;
}

.cookie-details {
    margin-top: 10px;
}

.cookie-details details {
    cursor: pointer;
}

.cookie-details summary {
    color: #ffd89b;
    font-weight: 600;
    margin-bottom: 10px;
}

.cookie-details ul {
    margin-left: 20px;
    margin-top: 10px;
}

.cookie-details li {
    margin-bottom: 5px;
    font-size: 0.9em;
    opacity: 0.8;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.cookie-btn.accept {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.cookie-btn.decline {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.cookie-btn.manage {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Cookie Settings Modal */
.cookie-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    backdrop-filter: blur(5px);
}

.cookie-settings-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 216, 155, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px 20px 0 0;
}

.cookie-settings-header h3 {
    color: #ffd89b;
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.cookie-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: scale(1.1);
}

.cookie-settings-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.cookie-category h4 {
    color: #ffd89b;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.cookie-category p {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 0.9em;
    line-height: 1.5;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.cookie-settings-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive Design for Cookie Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-text {
        min-width: auto;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-btn {
        padding: 8px 16px;
        font-size: 0.8em;
    }
}