/* SerpAPI Ranking Checker Styles */
.serpapi-ranking-checker {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ranking-form-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder {
    color: #999;
    font-style: italic;
}

.form-actions {
    text-align: center;
}

.check-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 2;
    pointer-events: auto;
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.check-btn:active {
    transform: translateY(-1px);
}

.check-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.check-btn .arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.check-btn:hover .arrow {
    transform: translateX(5px);
}

/* Loading Styles */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

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

.loading-container p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Results Styles */
.results-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.results-container h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.ranking-results {
    max-width: 100%;
}

.result-success {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.result-success::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes shimmer {
    0%, 100% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
}

.result-success h4 {
    margin: 0 0 20px 0;
    font-size: 28px;
    text-align: center;
}

.ranking-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.ranking-info p {
    margin: 10px 0;
    font-size: 16px;
}

.ranking-info strong {
    display: inline-block;
    width: 120px;
    font-weight: 600;
}

.ranking-info a {
    color: #fff;
    text-decoration: underline;
    word-break: break-all;
}

.ranking-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
    animation: pulse 2s infinite;
}

.ranking-badge.top-10 {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
}

.ranking-badge.top-20 {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
    color: #333;
}

.ranking-badge.top-50 {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: white;
}

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

.result-not-found {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.result-not-found h4 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.suggestions {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: left;
}

.suggestions h5 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.suggestions ul {
    margin: 0;
    padding-left: 20px;
}

/* Simple Result Messages */
.simple-result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.simple-result-success p {
    margin: 0;
    color: #155724;
    font-size: 16px;
    font-weight: 500;
}

.simple-result-not-found {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.simple-result-not-found p {
    margin: 0;
    color: #721c24;
    font-size: 16px;
    font-weight: 500;
}

.simple-result-not-found p {
    margin: 0;
    color: #721c24;
    font-size: 16px;
    font-weight: 500;
}

/* Results Warning */
.results-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.results-warning p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Results Table Styles */
.all-results-section {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.all-results-section h3 {
    color: #333;
    margin: 0 0 25px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-count {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.results-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
}

.results-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table th:first-child {
    width: 60px;
    text-align: center;
}

.results-table th:nth-child(2) {
    width: 200px;
}

.results-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
    background-color: #f8f9ff;
}

.results-table tbody tr.target-site {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), rgba(255, 255, 255, 0.1));
    border-left: 4px solid #667eea;
}

.results-table tbody tr.target-site:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), rgba(255, 255, 255, 0.1));
}

.results-table td {
    padding: 15px;
    vertical-align: top;
}

.rank-cell {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: #667eea;
    width: 60px;
}

.domain-cell {
    font-weight: 500;
    width: 200px;
}

.domain-cell a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.domain-cell a:hover {
    color: #667eea;
    text-decoration: underline;
}

.your-site-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    }
    to {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.6);
    }
}

.content-cell {
    max-width: 400px;
}

.result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    font-size: 14px;
}

.result-snippet {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 5px;
}

/* Responsive Table */
@media (max-width: 768px) {
    .results-table-container {
        overflow-x: scroll;
    }
    
    .results-table {
        min-width: 600px;
    }
    
    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }
    
    .result-title {
        font-size: 13px;
    }
    
    .result-snippet {
        font-size: 12px;
    }
    
    .your-site-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .all-results-section {
        padding: 15px;
        margin: 10px;
    }
    
    .all-results-section h3 {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th {
        padding: 8px 5px;
        font-size: 11px;
    }
    
    .results-table td {
        padding: 8px 5px;
    }
    
    .rank-cell {
        font-size: 14px;
    }
}

/* Tablo için scroll bar styling */
.results-table-container::-webkit-scrollbar {
    height: 8px;
}

.results-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.results-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

.results-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ranking-form-container {
        padding: 25px;
        margin: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .check-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .results-container {
        margin: 15px;
        padding: 20px;
    }
    
    .ranking-info strong {
        width: 100px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .serpapi-ranking-checker {
        margin: 10px;
    }
    
    .ranking-form-container {
        padding: 20px;
        margin: 10px 0;
    }
    
    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 12px;
    }
    
    .check-btn {
        font-size: 14px;
        padding: 12px 25px;
    }
    
    .ranking-info strong {
        display: block;
        width: auto;
        margin-bottom: 5px;
    }
}