/* Sensör testi özel stilleri */

.sensor-container {
    background: linear-gradient(135deg, #16a085 0%, #f4d03f 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Sensor Cards */
.sensor-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.sensor-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.sensor-card.active {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.sensor-card.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

/* Sensor Header */
.sensor-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sensor-header i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.sensor-header h5 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sensor-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sensor-status.active {
    background: rgba(39, 174, 96, 0.8);
    border-color: #27ae60;
}

.sensor-status.error {
    background: rgba(231, 76, 60, 0.8);
    border-color: #e74c3c;
}

.sensor-status.unavailable {
    background: rgba(149, 165, 166, 0.8);
    border-color: #95a5a6;
}

/* Sensor Data */
.sensor-data {
    margin-bottom: 1rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.data-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.data-value {
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

/* Sensor Visualizations */
.sensor-visualization {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Canvas Visualizations */
canvas {
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

/* Compass Display */
.compass-display {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.3));
}

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 40px;
    background: linear-gradient(to top, #e74c3c, #f39c12);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform 0.3s ease;
    border-radius: 1px;
}

.compass-needle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -3px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
}

.compass-directions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.direction {
    position: absolute;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
}

.direction.north {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.direction.east {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.direction.south {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.direction.west {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Light Meter */
.light-meter {
    width: 150px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.light-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2c3e50, #f39c12, #f1c40f);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.light-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: light-shimmer 2s infinite;
}

@keyframes light-shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.light-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Proximity Display */
.proximity-display {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proximity-indicator {
    width: 20px;
    height: 20px;
    background: #3498db;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.proximity-indicator.near {
    background: #e74c3c;
    transform: scale(1.5);
}

.proximity-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wave {
    position: absolute;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    animation: proximity-wave 2s infinite;
}

.wave:nth-child(1) {
    width: 30px;
    height: 30px;
    margin: -15px;
    animation-delay: 0s;
}

.wave:nth-child(2) {
    width: 50px;
    height: 50px;
    margin: -25px;
    animation-delay: 0.5s;
}

.wave:nth-child(3) {
    width: 70px;
    height: 70px;
    margin: -35px;
    animation-delay: 1s;
}

@keyframes proximity-wave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Battery Display */
.battery-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

.battery-body {
    width: 60px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.battery-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.battery-fill.charging {
    animation: battery-charging 2s infinite;
}

@keyframes battery-charging {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.battery-tip {
    width: 4px;
    height: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 2px 2px 0;
    margin-left: 2px;
}

/* Sensor Controls */
.sensor-controls {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sensor-controls .btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.sensor-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Sensor Info */
.sensor-info {
    border: 1px solid rgba(13, 110, 253, 0.1);
    transition: all 0.3s ease;
}

.sensor-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sensor-info .badge {
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Loading Animation */
.sensor-loading {
    position: relative;
    overflow: hidden;
}

.sensor-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: sensor-shimmer 2s infinite;
}

@keyframes sensor-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Calibration Animation */
.calibrating {
    animation: calibration-pulse 1s infinite;
}

@keyframes calibration-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .sensor-container {
        padding: 1rem;
    }
    
    .sensor-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .sensor-header h5 {
        font-size: 1rem;
    }
    
    .sensor-header i {
        font-size: 1.2rem;
    }
    
    .sensor-visualization {
        height: 100px;
    }
    
    .compass-display {
        width: 80px;
        height: 80px;
    }
    
    .compass-needle {
        height: 30px;
    }
    
    .light-meter {
        width: 120px;
    }
    
    .proximity-display {
        width: 60px;
        height: 60px;
    }
    
    .battery-body {
        width: 50px;
        height: 25px;
    }
}

@media (max-width: 768px) {
    .sensor-card {
        padding: 0.75rem;
    }
    
    .sensor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sensor-header h5 {
        font-size: 0.9rem;
    }
    
    .sensor-status {
        font-size: 0.7rem;
        align-self: flex-end;
    }
    
    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .data-value {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .sensor-visualization {
        height: 80px;
    }
    
    .compass-display {
        width: 60px;
        height: 60px;
    }
    
    .compass-needle {
        height: 20px;
    }
    
    .direction {
        font-size: 0.6rem;
    }
    
    .light-meter {
        width: 100px;
        height: 15px;
    }
    
    .light-scale {
        font-size: 0.6rem;
    }
    
    .proximity-display {
        width: 50px;
        height: 50px;
    }
    
    .proximity-indicator {
        width: 15px;
        height: 15px;
    }
    
    .wave:nth-child(1) {
        width: 25px;
        height: 25px;
        margin: -12.5px;
    }
    
    .wave:nth-child(2) {
        width: 40px;
        height: 40px;
        margin: -20px;
    }
    
    .wave:nth-child(3) {
        width: 55px;
        height: 55px;
        margin: -27.5px;
    }
    
    .battery-body {
        width: 40px;
        height: 20px;
    }
    
    .battery-tip {
        width: 3px;
        height: 12px;
    }
    
    .sensor-controls {
        padding: 1rem;
    }
    
    .sensor-controls .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .sensor-container {
        padding: 0.75rem;
    }
    
    .sensor-card {
        padding: 0.5rem;
    }
    
    .sensor-header h5 {
        font-size: 0.8rem;
    }
    
    .sensor-header i {
        font-size: 1rem;
    }
    
    .data-label {
        font-size: 0.8rem;
    }
    
    .data-value {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .sensor-visualization {
        height: 60px;
    }
    
    canvas {
        width: 120px !important;
        height: 50px !important;
    }
    
    .compass-display {
        width: 50px;
        height: 50px;
    }
    
    .compass-needle {
        height: 15px;
        width: 1px;
    }
    
    .direction {
        font-size: 0.5rem;
    }
    
    .light-meter {
        width: 80px;
        height: 12px;
    }
    
    .proximity-display {
        width: 40px;
        height: 40px;
    }
    
    .proximity-indicator {
        width: 12px;
        height: 12px;
    }
    
    .battery-body {
        width: 35px;
        height: 18px;
    }
    
    .sensor-controls {
        padding: 0.75rem;
    }
    
    .sensor-controls .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Accessibility */
.sensor-controls .btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .sensor-container {
        background: #000;
        border: 2px solid #fff;
    }
    
    .sensor-card {
        background: #000;
        border: 2px solid #fff;
    }
    
    .sensor-card.active {
        border-color: #0f0;
    }
    
    .sensor-card.error {
        border-color: #f00;
    }
    
    .compass-display {
        border-color: #fff;
    }
    
    .compass-needle {
        background: #f00;
    }
    
    .light-meter,
    .battery-body {
        border-color: #fff;
    }
    
    .proximity-indicator {
        background: #fff;
    }
    
    .wave {
        border-color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .sensor-card,
    .sensor-controls .btn,
    .compass-needle,
    .light-bar,
    .battery-fill,
    .proximity-indicator {
        transition: none;
        animation: none;
    }
    
    .sensor-card:hover,
    .sensor-controls .btn:hover {
        transform: none;
    }
    
    .wave,
    .sensor-loading::after,
    .light-bar::after,
    .battery-fill.charging {
        animation: none;
    }
    
    .calibrating {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .sensor-controls {
        display: none;
    }
    
    .sensor-container {
        background: white;
        color: black;
    }
    
    .sensor-card {
        background: white;
        border: 1px solid #ccc;
    }
    
    .sensor-visualization {
        background: #f5f5f5;
    }
}
