* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 5px;
}

header p {
    color: #7f8c8d;
    font-size: 0.95em;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
}

/* Control Panel */
.control-panel {
    background: white;
    border-radius: 10px;
    padding: 25px;
    width: 350px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.control-panel h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
    font-size: 0.9em;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.95em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-group input[type="date"] {
    margin-top: 5px;
}

/* Polygon Info */
.polygon-info {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.polygon-info p {
    margin-bottom: 5px;
    color: #555;
}

.polygon-info small {
    color: #888;
}

#pointCount {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-success {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-primary.active, .btn-danger.active, .btn-success.active {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.results {
    margin-top: 20px;
}

.results h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.result-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
}

.result-card h4 {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-card .score {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.result-card .score-label {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
}

.result-card .value {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
}

.recommendation {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.recommendation::before {
    content: "💡 ";
    font-size: 1.2em;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.map-legend h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 0.95em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-item .color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}

.legend-item span:last-child {
    font-size: 0.85em;
    color: #555;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85em;
}

footer a {
    color: #667eea;
    text-decoration: none;
    margin: 0 5px;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
        max-height: none;
    }

    #map {
        min-height: 400px;
    }
}

/* Scrollbar */
.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Fullscreen Loading Animation */
.fullscreen-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* SVG Animasyonları */
.water-finder {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Çubuk sallanma animasyonu */
.divining-rod {
    transform-origin: 130px 100px;
    animation: swingRod 1.5s ease-in-out infinite;
}

@keyframes swingRod {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

/* Bacak yürüme animasyonu */
.leg-left {
    animation: walkLeft 1s ease-in-out infinite;
}

.leg-right {
    animation: walkRight 1s ease-in-out infinite;
}

@keyframes walkLeft {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-5deg); }
}

@keyframes walkRight {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

/* Su sinyali titreşimi */
.water-signal {
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        r: 2;
    }
    50% {
        opacity: 1;
        r: 4;
    }
}

/* Yeraltı suyu animasyonu */
.water-drop {
    animation: bubble 2s ease-in-out infinite;
}

.drop1 {
    animation-delay: 0s;
}

.drop2 {
    animation-delay: 0.3s;
}

.drop3 {
    animation-delay: 0.6s;
}

@keyframes bubble {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-5px) scale(1.2);
        opacity: 1;
    }
}

.water-wave {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(1);
    }
    50% {
        opacity: 0.7;
        transform: scaleX(1.1);
    }
}

/* Loading text */
.loading-text {
    margin-top: 30px;
    color: white;
}

.loading-text h3 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 2px 10px rgba(70, 144, 226, 0.5); }
    50% { text-shadow: 0 2px 20px rgba(70, 144, 226, 1); }
}

.loading-subtitle {
    font-size: 1.1em;
    color: #a8d8ff;
    margin-bottom: 20px;
}

/* Animated dots */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #4a90e2;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-15px);
    }
}
