
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --warning-color: #fbbc05;
    --danger-color: #ea4335;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --medium-gray: #757575;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #f9f9f9;
}



h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

h1 i {
    margin-right: 10px;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background: linear-gradient(135deg, var(--light-gray), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-status {
    font-size: 0.9rem;
}

.auth-section a, .user-section a {
    color: white;
    text-decoration: none;
}

.tool-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.tool-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.result-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    display: none;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric-card {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
}

.progress-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s;
}

.issues-list {
    list-style-type: none;
}

.issues-list li {
    padding: 0.7rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.issues-list li:before {
    content: "•";
    color: var(--danger-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5rem;
}

.success-item:before {
    color: var(--success-color) !important;
}

.warning-item:before {
    color: var(--warning-color) !important;
}

/* 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);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 0.5rem;
    background-color: #f1f1f1;
}

.tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast-error {
    background-color: var(--danger-color);
}

.disabled {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .auth-status {
        margin-top: 1rem;
    }
}
/* Google Sign-In Button Styles */
.g_id_signin {
    margin: 10px 0;
}

#custom-google-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

#custom-google-signin:hover {
    background: #f5f5f5;
}

#custom-google-signin img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.social-signin-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #666;
}

.social-signin-divider::before,
.social-signin-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.social-signin-divider::before {
    margin-right: 10px;
}

.social-signin-divider::after {
    margin-left: 10px;
}





.subtitle {
    text-align: center;
    color: var(--medium-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.input-section {
    display: flex;
    margin-bottom: 30px;
    gap: 10px;
}

input[type="url"] {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3367d6;
}

#checkSpeedBtn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading {
    text-align: center;
    margin: 30px 0;
    display: none;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    display: none;
    margin-top: 20px;
}

.score-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 20px;
}

.score-card {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.score-card h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--medium-gray);
}

.score-card h2 i {
    margin-right: 8px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

.mobile .score-circle {
    background-color: var(--primary-color);
}

.desktop .score-circle {
    background-color: var(--secondary-color);
}

.score-label {
    font-size: 1rem;
    color: var(--medium-gray);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    padding: 20px;
    border-radius: 10px;
    background-color: var(--light-gray);
}

.metric-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.metric-values {
    display: flex;
    justify-content: space-between;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.metric-device {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.recommendations {
    margin-top: 30px;
}

.recommendations h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--dark-gray);
}

.recommendations h3 i {
    margin-right: 10px;
    color: var(--warning-color);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--medium-gray);
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.recommendations ul {
    list-style-type: none;
}

.recommendations li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.error {
    display: none;
    padding: 20px;
    background-color: #fee;
    border-radius: 5px;
    color: var(--danger-color);
    margin-top: 20px;
    text-align: center;
}

.error i {
    font-size: 2rem;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .score-container {
        flex-direction: column;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}