:root {
    --primary: #4a6bdf;
    --primary-dark: #3a5bc7;
    --secondary: #6b7fd7;
    --accent: #f03a47;
    --accent-dark: #d02835;
    --background: #f8f9fc;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8ed;
    --success: #2ecc71;
    --warning: #f39c12;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.kohi-click-test-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.kohi-click-test-tool-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.kohi-click-test-tool-card:hover {
    box-shadow: var(--shadow-hover);
}

.kohi-click-test-tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.kohi-click-test-tool-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.kohi-click-test-tool-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.kohi-click-test-control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.kohi-click-test-time-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.kohi-click-test-time-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.kohi-click-test-time-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.kohi-click-test-time-btn.active {
    background: var(--primary);
    color: white;
}

.kohi-click-test-start-btn, .kohi-click-test-reset-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.kohi-click-test-start-btn {
    background: var(--primary);
    color: white;
}

.kohi-click-test-start-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.kohi-click-test-reset-btn {
    background: var(--warning);
    color: white;
    opacity: 0.5;
    cursor: not-allowed;
}

.kohi-click-test-reset-btn:enabled {
    opacity: 1;
    cursor: pointer;
}

.kohi-click-test-reset-btn:hover:enabled {
    background: #e67e22;
    transform: translateY(-2px);
}

.kohi-click-test-horizontal-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.kohi-click-test-section {
    flex: 1;
}

.kohi-click-test-area {
    background: linear-gradient(145deg, #f0f3ff, #e8ecff);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 3px dashed transparent;
    user-select: none;
    margin-bottom: 30px;
}

.kohi-click-test-area:hover {
    border-color: var(--primary);
    background: linear-gradient(145deg, #e8ecff, #dde5ff);
}

.kohi-click-test-area.active {
    border-color: var(--primary);
    border-style: solid;
    background: linear-gradient(145deg, #dce4ff, #cddbff);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 107, 223, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(74, 107, 223, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 107, 223, 0); }
}

.kohi-click-test-area span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.kohi-click-test-click-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(74, 107, 223, 0.3);
}

.kohi-click-test-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kohi-click-test-result-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fc);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.kohi-click-test-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.kohi-click-test-result-item .label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.kohi-click-test-result-item .value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.kohi-click-test-cps-rating {
    text-align: center;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
}

.kohi-click-test-cps-rating.excellent { color: var(--success); }
.kohi-click-test-cps-rating.good { color: var(--primary); }
.kohi-click-test-cps-rating.average { color: var(--warning); }
.kohi-click-test-cps-rating.slow { color: var(--accent); }

.kohi-click-test-data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.kohi-click-test-chart-container, .kohi-click-test-leaderboard-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.kohi-click-test-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.kohi-click-test-section-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.kohi-click-test-clear-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.kohi-click-test-clear-btn:hover {
    background: var(--accent);
    color: white;
}

.kohi-click-test-chart-wrapper {
    position: relative;
    height: 300px;
}

.kohi-click-test-chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kohi-click-test-chart-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.kohi-click-test-chart-overlay-content {
    text-align: center;
}

.kohi-click-test-chart-overlay-content h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.kohi-click-test-chart-overlay-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.kohi-click-test-chart-overlay-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.kohi-click-test-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.kohi-click-test-leaderboard-table th, .kohi-click-test-leaderboard-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.kohi-click-test-leaderboard-table th {
    background: var(--background);
    font-weight: 700;
    color: var(--primary);
}

.kohi-click-test-leaderboard-table tbody tr:hover {
    background: var(--background);
}

.kohi-click-test-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.kohi-click-test-empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Modal */
.kohi-click-test-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.kohi-click-test-modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.kohi-click-test-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.kohi-click-test-modal-close:hover {
    color: var(--accent);
}

.kohi-click-test-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.kohi-click-test-modal-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.kohi-click-test-modal-body {
    display: flex;
    gap: 30px;
    align-items: center;
}

.kohi-click-test-modal-emoji {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.kohi-click-test-modal-results {
    flex: 1;
    background: var(--background);
    padding: 25px;
    border-radius: var(--radius);
}

.kohi-click-test-modal-result-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
}

.kohi-click-test-modal-result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.kohi-click-test-modal-result-label {
    color: var(--text-light);
}

.kohi-click-test-modal-result-value {
    font-weight: 700;
    color: var(--primary);
}

.kohi-click-test-modal-share {
    margin-top: 30px;
}

.kohi-click-test-modal-share h3 {
    text-align: center;
    margin-bottom: 15px;
}

.kohi-click-test-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.kohi-click-test-share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.kohi-click-test-share-whatsapp {
    background: #25D366;
    color: white;
}

.kohi-click-test-share-facebook {
    background: #1877F2;
    color: white;
}

.kohi-click-test-share-copy {
    background: var(--primary);
    color: white;
}

.kohi-click-test-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.kohi-click-test-copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.kohi-click-test-copy-notification.show {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .kohi-click-test-data-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kohi-click-test-horizontal-layout {
        flex-direction: column;
    }

    .kohi-click-test-results {
        grid-template-columns: 1fr;
    }

    .kohi-click-test-control-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .kohi-click-test-time-group {
        justify-content: center;
    }

    .kohi-click-test-start-btn, .kohi-click-test-reset-btn {
        width: 100%;
    }

    .kohi-click-test-area {
        min-height: 200px;
        padding: 40px 20px;
    }

    .kohi-click-test-modal-body {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kohi-click-test-tool-card {
        padding: 25px 20px;
    }

    .kohi-click-test-tool-header h2 {
        font-size: 2rem;
    }

    .kohi-click-test-modal-content {
        padding: 30px 20px;
    }

    .kohi-click-test-share-btn {
        width: 100%;
    }
}