/* Modern BIN Search Engine Styles */

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.search-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
}

.card-visual {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 16px;
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.card-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.chip {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 35px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 8px;
    border: 2px solid #d4af37;
    z-index: 2;
}

.chip::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid #d4af37;
    border-radius: 4px;
}

.contactless {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 30px;
    height: 30px;
    color: white;
    font-size: 24px;
    z-index: 2;
}

.card-number {
    position: absolute;
    bottom: 60px;
    left: 30px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 2;
}

.card-holder {
    position: absolute;
    bottom: 20px;
    left: 30px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    z-index: 2;
}

.scheme-logo {
    position: absolute;
    bottom: 20px;
    right: 30px;
    height: 30px;
    width: auto;
    z-index: 2;
}

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

.input-label {
    display: block;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.bin-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    background: white;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.bin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.bin-input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.bin-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.clear-btn.visible {
    opacity: 1;
}

.search-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.search-btn.disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.search-btn.enabled {
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
}

.search-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

.captcha-group {
    margin: 25px 0;
}

.captcha-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.captcha-image-container {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-image-container img {
    display: block;
    border-radius: 4px;
}

.captcha-text-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 4px;
    text-align: center;
    border: 2px solid #5a6fd8;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    min-width: 120px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.refresh-captcha-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.refresh-captcha-btn:hover {
    background: #5a6fd8;
    transform: rotate(180deg);
}

.captcha-input {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
}

.captcha-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.captcha-input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.captcha-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Dark mode için CAPTCHA stilleri */
.dark-mode .captcha-image-container {
    border-color: #4b5563;
    background: #374151;
}

.dark-mode .captcha-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-mode .captcha-input:focus {
    border-color: #667eea;
}

/* Responsive tasarım */
@media (max-width: 640px) {
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-image-container {
        justify-content: center;
    }
}

.results-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: none;
}

.results-card.visible {
    display: block;
    animation: slideUp 0.5s ease;
}

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

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.result-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 18px;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.result-grid {
    display: grid;
    gap: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.95rem;
}

.result-value {
    font-weight: 600;
    color: #111827;
    text-align: right;
    font-size: 1rem;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    display: none;
}

.error-message.visible {
    display: block;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.loading.visible {
    display: block;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Dark mode styles */
.dark-mode {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.dark-mode .search-card {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .results-card {
    background: #1f2937;
    border: 1px solid #374151;
}

.dark-mode .input-label,
.dark-mode .result-title,
.dark-mode .result-value {
    color: #f9fafb;
}

.dark-mode .bin-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-mode .bin-input:focus {
    border-color: #667eea;
}

.dark-mode .result-label {
    color: #d1d5db;
}

.dark-mode .clear-btn {
    color: #d1d5db;
}

.dark-mode .clear-btn:hover {
    background: #4b5563;
    color: #f9fafb;
}

.dark-mode .error-message {
    background: #7f1d1d;
    color: #fecaca;
}

/* Refresh button spin effect */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

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

.refresh-captcha-btn:hover i {
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }
    
    .search-card {
        padding: 25px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card-visual {
        height: 160px;
    }
    
    .card-number {
        font-size: 16px;
        bottom: 40px;
    }
    
    .card-holder {
        font-size: 12px;
        bottom: 15px;
    }
    
    .chip {
        width: 40px;
        height: 28px;
        top: 20px;
        left: 20px;
    }
    
    .contactless {
        top: 20px;
        right: 20px;
        font-size: 20px;
    }
    
    .scheme-logo {
        bottom: 15px;
        right: 20px;
        height: 24px;
    }
}
