/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.header-logo img {
    max-height: 50px;
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-menu a {
    color: #ee4d2d;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-menu a i {
    margin-right: 5px;
}

.nav-menu a:hover {
    color: #f76b5a;
}

h2 {
    color: #ee4d2d;
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.input-with-button {
    display: flex;
    position: relative;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, textarea:focus {
    border-color: #ee4d2d;
    outline: none;
}

textarea {
    resize: none;
    height: 80px;
}

button {
    background-color: #ee4d2d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

button i {
    margin-right: 5px;
}

button:hover {
    background-color: #f76b5a;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.button-group button {
    flex: 1;
}

#clearBtn {
    background-color: #999;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 10px;
    font-size: 14px;
}

#clearBtn:hover {
    background-color: #777;
}

.button-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.counter-stats {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.counter-item i {
    margin-right: 5px;
    color: #ee4d2d;
}

.history-link {
    margin-left: 15px;
    color: #ee4d2d;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.history-link i {
    margin-right: 3px;
}

.guide-note {
    background-color: #fff8e1;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid #ffc107;
}

.guide-note ul {
    margin-top: 10px;
    padding-left: 20px;
}

.guide-note li {
    margin-bottom: 5px;
}

.guide-note p {
    margin: 0;
}

.button-example {
    background-color: #f1f1f1;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: #333;
}

.guide-tip {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid #4caf50;
}

.guide-tip ul {
    margin-top: 10px;
    padding-left: 20px;
}

.guide-tip li {
    margin-bottom: 5px;
}

.guide-link {
    color: #ee4d2d;
    text-decoration: none;
}

.guide-link:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.footer a {
    color: #ee4d2d;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.redirect-message {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}

.redirect-message h3 {
    color: #ee4d2d;
    margin-bottom: 15px;
}

.redirect-message p {
    margin-bottom: 20px;
}

#redirectTimer {
    font-weight: bold;
    color: #ee4d2d;
}

.loading {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .nav-menu {
        margin-top: 0;
    }
    
    .menu-text {
        display: none;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-wrapper {
        justify-content: center;
    }
    
    .counter-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-link {
        margin-left: 0;
        margin-top: 5px;
    }
}
