:root {
    --osu-pink: #ff66aa;
    --osu-dark-pink: #e64d95;
    --osu-purple: #a366ff;
    --osu-dark: #2d2d42;
    --osu-darker: #1a1a2e;
    --osu-light: #f2f2f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--osu-darker) 0%, var(--osu-dark) 100%);
    color: var(--osu-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--osu-pink);
    text-shadow: 0 0 10px rgba(255, 102, 170, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--osu-light);
    opacity: 0.8;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.control-panel {
    display: flex;
    flex-direction: column;
}

.counter {
    text-align: center;
    margin-bottom: 20px;
}

#counter {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--osu-pink);
    text-shadow: 0 0 15px rgba(255, 102, 170, 0.7);
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

#cps-counter {
    font-size: 1.5rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--osu-pink);
    color: white;
}

.btn-primary:hover {
    background: var(--osu-dark-pink);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--osu-purple);
    color: white;
}

.btn-secondary:hover {
    background: #8a4fff;
    transform: translateY(-2px);
}

.settings {
    margin: 20px 0;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--osu-pink);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--osu-pink);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-input {
    width: 80px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--osu-purple);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
}

.key-binds {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.key-btn {
    padding: 10px 15px;
    background: rgba(255, 102, 170, 0.2);
    border: 2px solid var(--osu-pink);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

.key-btn:hover {
    background: rgba(255, 102, 170, 0.3);
}

.key-btn.active {
    background: var(--osu-pink);
    box-shadow: 0 0 15px rgba(255, 102, 170, 0.5);
}

.key-btn.rebinding {
    animation: rebind-pulse 1s infinite;
}

@keyframes rebind-pulse {
    0% { background-color: rgba(255, 102, 170, 0.2); }
    50% { background-color: rgba(255, 102, 170, 0.8); }
    100% { background-color: rgba(255, 102, 170, 0.2); }
}

.stats-panel {
    display: flex;
    flex-direction: column;
}

.stat-section {
    margin-bottom: 25px;
}

.stat-title {
    color: var(--osu-pink);
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--osu-purple);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-weight: bold;
}

.stat-value {
    color: var(--osu-pink);
    font-weight: bold;
}

.history-panel {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background: rgba(255, 102, 170, 0.2);
    color: var(--osu-pink);
    font-weight: bold;
}

.history-table tr:hover {
    background: rgba(255, 102, 170, 0.1);
}

footer {
    text-align: center;
    margin-top: auto;
    padding: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

.pulse {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    background: var(--osu-dark);
    border-left: 4px solid var(--osu-pink);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.reference-table th, 
.reference-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reference-table th {
    background: rgba(255, 102, 170, 0.2);
    color: var(--osu-pink);
}

.reference-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.reference-table tr:hover {
    background: rgba(255, 102, 170, 0.1);
}

.current-level {
    background: rgba(255, 102, 170, 0.3) !important;
    font-weight: bold;
}

.rank-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 5px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: bold;
}

.rank-1 { background: linear-gradient(135deg, #ffcc00, #ff9900); color: #000; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a56c28); color: #000; }
.rank-4 { background: linear-gradient(135deg, #ff66aa, #e64d95); color: #fff; }
.rank-5 { background: linear-gradient(135deg, #a366ff, #8a4fff); color: #fff; }
.rank-6 { background: linear-gradient(135deg, #66b2ff, #4d95e6); color: #fff; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    color: var(--osu-pink);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--osu-light);
    transform: translateY(-2px);
}

.footer-link-icon {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.footer-separator {
    margin: 0 10px;
    color: var(--osu-purple);
}

.footer-credits {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Новые анимации для индикатора CPS */
@keyframes idle-sway {
    0% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-2px) scale(1.01); }
    50% { transform: translateX(2px) scale(1); }
    75% { transform: translateX(-1px) scale(1.01); }
    100% { transform: translateX(0) scale(1); }
}

.idle-animation {
    animation: idle-sway 3s infinite ease-in-out;
}

.cps-indicator {
    transition: all 0.3s ease;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    color: var(--osu-pink);
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.back-btn i {
    margin-right: 8px;
}

.back-btn:hover {
    color: var(--osu-dark-pink);
    transform: translateX(0px);
}

/* Стили для графика и дополнительной статистики */
.chart-container {
    width: 100%;
    height: 300px;
    margin-top: 20px;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.chart-btn {
    padding: 8px 15px;
    background: rgba(255, 102, 170, 0.2);
    border: 1px solid var(--osu-pink);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-btn:hover {
    background: rgba(255, 102, 170, 0.3);
}

.chart-btn.active {
    background: var(--osu-pink);
}

/* Изначально скрываем блоки настроек */
#timer-set {
    display: block;
}

#clicks-set {
    display: none;
}