:root {
    --recorder-bg: #11161f;
    --card-bg: rgba(0, 0, 0, 0.6);
    --card-hover: rgba(0, 0, 0, 0.8);
    --card-border: rgba(255, 136, 0, 0.3);
    --card-border-hover: rgba(255, 136, 0, 0.6);
    --recorder-accent: #ff9b33;
    --recorder-accent-hover: #ff8800;
    --recorder-secondary: #30CFD0;
    --recorder-text: #f8f8f8;
    --recorder-text-dim: #a0a0a0;
    --recorder-glass-blur: 10px;
    --recorder-transition: 0.3s ease;
}

.path-recorder {
    background-color: var(--recorder-bg);
    min-height: 100vh;
    padding-top: 20px;
    position: relative;
    overflow: hidden;
}

.path-recorder-logo {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    position: relative;
    z-index: 5;
}

.path-recorder-logo .logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.copyright-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(var(--recorder-glass-blur));
    position: relative;
    z-index: 5;
}

.copyright-bar p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--recorder-text-dim);
}

.grid-background {
    position: absolute;
    width: 500%;
    height: 500%;
    top: -100%;
    left: -100%;
    transform: rotateX(75deg) translateY(5em);
    transform-origin: center;
    background: repeating-linear-gradient(
        to right,
        rgba(255, 136, 0, 0.2),
        rgba(255, 136, 0, 0.2) 1px,
        transparent 1px,
        transparent 50px
    ),
    repeating-linear-gradient(
        to bottom,
        rgba(255, 136, 0, 0.2),
        rgba(255, 136, 0, 0.2) 1px,
        transparent 1px,
        transparent 50px
    );
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.grid-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, transparent, rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.recorder-header {
    padding: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.recorder-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.recorder-header .subtitle {
    font-size: 1.2rem;
    color: var(--recorder-text-dim);
    margin-bottom: 2rem;
}

.recorder-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--recorder-glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    min-width: 140px;
    text-align: center;
    transition: all var(--recorder-transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-border-hover);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--recorder-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--recorder-text-dim);
    font-weight: 500;
}

.recorder-panel {
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.panel-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.panel-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.control-sidebar {
    background: var(--card-bg);
    backdrop-filter: blur(var(--recorder-glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    max-height: 85vh;
    overflow-y: auto;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--recorder-text);
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--recorder-transition);
}

.control-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--recorder-accent);
    transform: translateX(5px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.record-btn {
    border-color: #2ed573;
}

.record-btn svg {
    fill: #2ed573;
}

.record-btn.recording {
    background: rgba(46, 213, 115, 0.2);
    border-color: #2ed573;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(46, 213, 115, 0);
    }
}

.stop-btn {
    border-color: #ff4757;
}

.live-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.live-stats h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--recorder-text);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label-small {
    font-size: 0.9rem;
    color: var(--recorder-text-dim);
}

.stat-value-small {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: var(--recorder-accent);
    font-weight: 500;
}

.saved-paths {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
}

.refresh-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--recorder-text);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--recorder-transition);
}

.refresh-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--recorder-accent);
    transform: rotate(90deg);
}

.paths-list {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--recorder-text-dim);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 0;
}

.path-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all var(--recorder-transition);
    cursor: pointer;
}

.path-item:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--recorder-accent);
}

.path-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.path-item-name {
    font-weight: 600;
    color: var(--recorder-text);
    font-size: 0.95rem;
}

.path-item-actions {
    display: flex;
    gap: 0.5rem;
}

.path-action-btn {
    background: transparent;
    border: none;
    color: var(--recorder-text-dim);
    cursor: pointer;
    padding: 0.25rem;
    transition: all var(--recorder-transition);
}

.path-action-btn:hover {
    color: var(--recorder-accent);
    transform: scale(1.1);
}

.path-action-btn svg {
    width: 16px;
    height: 16px;
}

.path-item-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--recorder-text-dim);
}

.path-item-date {
    font-size: 0.75rem;
    color: var(--recorder-text-dim);
    margin-top: 0.25rem;
}

.map-container-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(var(--recorder-glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: relative;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.map-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.map-info p {
    font-size: 0.9rem;
    color: var(--recorder-text-dim);
    margin: 0;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--recorder-text);
    cursor: pointer;
    transition: all var(--recorder-transition);
}

.icon-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--recorder-accent);
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.gps-status {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gps-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--recorder-text);
}

.gps-indicator svg {
    color: #2ed573;
    animation: gps-pulse 2s ease-in-out infinite;
}

@keyframes gps-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.gps-indicator.searching svg {
    color: var(--recorder-accent);
}

.gps-indicator.error svg {
    color: #ff4757;
    animation: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--recorder-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--recorder-text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--recorder-transition);
}

.close-modal:hover {
    color: var(--recorder-text);
}

.modal-body {
    padding: 1.5rem;
}

.track-summary {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.track-summary h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--recorder-text-dim);
}

.summary-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--recorder-accent);
    font-weight: 500;
}

.track-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--recorder-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--recorder-accent);
    box-shadow: 0 0 0 2px rgba(255, 155, 51, 0.25);
}

.form-group .floating-label {
    position: absolute;
    top: 12px;
    left: 16px;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.form-group input:focus ~ .floating-label,
.form-group input:not(:placeholder-shown) ~ .floating-label,
.form-group textarea:focus ~ .floating-label,
.form-group textarea:not(:placeholder-shown) ~ .floating-label {
    transform: translateY(-25px) scale(0.85);
    color: var(--recorder-accent);
}

.form-group .char-counter {
    position: absolute;
    right: 10px;
    bottom: -20px;
    font-size: 0.8rem;
    color: var(--recorder-text-dim);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-group input:focus ~ .char-counter,
.form-group textarea:focus ~ .char-counter {
    opacity: 1;
}

.form-group .input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--recorder-text-dim);
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-group input:focus ~ .input-icon {
    color: var(--recorder-accent);
}

.form-group.with-icon input {
    padding-right: 40px;
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff9b33, #ff5500);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--recorder-transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 136, 0, 0.4);
}

html, body, a, button, input, textarea, label {
    cursor: none !important;
}

.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--recorder-accent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: width 0.2s, height 0.2s;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--recorder-accent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, transform 0.1s;
}

.leaflet-container {
    cursor: none !important;
}

@media (max-width: 992px) {
    .panel-layout {
        grid-template-columns: 1fr;
    }
    
    .control-sidebar {
        max-height: none;
    }
    
    #map {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .recorder-stats {
        gap: 1rem;
    }
    
    .stat-card {
        min-width: calc(50% - 0.5rem);
    }
    
    #map {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .recorder-header h1 {
        font-size: 2.5rem;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in {
    transform: translateY(0);
}

.fade-in.animated {
    transform: translateY(0);
}

.slide-up {
    transform: translateY(60px);
}

.slide-up.animated {
    transform: translateY(0);
}

.slide-left {
    transform: translateX(60px);
}

.slide-left.animated {
    transform: translateX(0);
}

.slide-right {
    transform: translateX(-60px);
}

.slide-right.animated {
    transform: translateX(0);
}

.scale-up {
    transform: scale(0.85);
}

.scale-up.animated {
    transform: scale(1);
}
