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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-user-select: none;
    user-select: none;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* Mobil responsive breakpoints */
@media (min-width: 768px) {
    .container {
        max-width: 1400px;
        padding: 20px;
    }
}

.header {
    text-align: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

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

/* Mobil header */
@media (max-width: 767px) {
    .header h1 {
        font-size: 1.4em;
    }
    .header p {
        font-size: 0.85em;
    }
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
}

/* Mobil status bar */
@media (max-width: 767px) {
    .status-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        font-size: 0.8em;
    }
    
    .last-update {
        order: 2;
    }
    
    .connection-status {
        order: 1;
    }
}

.last-update {
    color: #2c3e50;
    font-weight: 600;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #27ae60;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #27ae60;
    animation: pulse 2s infinite;
}

.status-dot.connecting {
    background: #f39c12;
}

.status-dot.error {
    background: #e74c3c;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.section {
    margin-bottom: 30px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Mobil grid */
@media (max-width: 767px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Tablet grid */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: grab;
    touch-action: manipulation;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card:active {
    cursor: grabbing;
    transform: scale(1.02);
}

/* Mobil card optimizasyonu */
@media (max-width: 767px) {
    .card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .card:hover {
        transform: none; /* Mobilde hover efekti kaldır */
    }
    
    .card:active {
        transform: scale(0.98); /* Touch feedback */
        transition: transform 0.1s ease;
    }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.drag-handle {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.card:hover .drag-handle {
    opacity: 1;
}

.drag-icon {
    cursor: grab;
    padding: 4px;
    border-radius: 4px;
    color: #7f8c8d;
    font-size: 14px;
}

.drag-icon:hover {
    background: rgba(127, 140, 141, 0.1);
}

.card-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #2c3e50;
}

.card-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

/* Mobil card header */
@media (max-width: 767px) {
    .card-header {
        margin-bottom: 12px;
    }
    
    .card-title {
        font-size: 0.95em;
    }
    
    .card-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .drag-handle {
        gap: 6px;
    }
    
    .drag-icon {
        font-size: 12px;
        padding: 3px;
    }
}

.usd-icon { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.eur-icon { background: linear-gradient(135deg, #3498db, #2980b9); }
.gold-icon { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.silver-icon { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.jewelry-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.price-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.price-box {
    text-align: center;
    flex: 1;
}

.price-label {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.price-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

/* Mobil price container */
@media (max-width: 767px) {
    .price-container {
        margin-bottom: 10px;
        gap: 8px;
    }
    
    .price-label {
        font-size: 0.8em;
        margin-bottom: 3px;
    }
    
    .price-value {
        font-size: 1.1em;
    }
}

.buy-price { color: #27ae60; }
.sell-price { color: #e74c3c; }

.change-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    padding: 6px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85em;
}

.alarm-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(127, 140, 141, 0.2);
}

.alarm-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.alarm-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid rgba(127, 140, 141, 0.3);
    border-radius: 6px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.9);
}

.alarm-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.alarm-status {
    font-size: 11px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobil alarm section */
@media (max-width: 767px) {
    .alarm-section {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .alarm-controls {
        gap: 5px;
        margin-bottom: 6px;
    }
    
    .alarm-input {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .alarm-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .alarm-status {
        font-size: 10px;
        gap: 3px;
    }
    
    .change-indicator {
        margin-top: 6px;
        padding: 5px;
        font-size: 0.8em;
    }
}

.change-positive {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.change-negative {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.change-neutral {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

.alarm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.alarm-btn.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.alarm-status.active {
    color: #e74c3c;
}

/* Touch optimizasyonu */
@media (max-width: 767px) {
    .alarm-btn:hover {
        transform: none; /* Mobilde hover kaldır */
    }
    
    .alarm-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Notification mobil optimizasyonu */
.notification {
    position: fixed;
    top: 10px;
    right: 10px;
    left: 10px;
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideInMobile 0.5s ease;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .notification {
        left: auto;
        right: 20px;
        max-width: 300px;
        animation: slideIn 0.5s ease;
    }
}

@keyframes slideInMobile {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.notification-text {
    font-size: 0.8em;
}

/* PWA Install butonu */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.install-btn {
    background: white;
    color: #3498db;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
