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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-section {
    display: flex;
    align-items: center;
}

.user-section span {
    margin-right: 15px;
    font-weight: bold;
}

.logout-btn {
    background-color: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #d32f2f;
    text-decoration: none;
}

h1 {
    color: #2c3e50;
    margin: 0;
}

h2 {
    color: #3498db;
    margin-bottom: 15px;
}

.form-section, .results-section {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], 
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #2980b9;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Truncate long URLs in table */
td a {
    display: block;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.nav-tabs a {
    padding: 10px 15px;
    margin-right: 2px;
    text-decoration: none;
    color: #333;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.nav-tabs a.active, .nav-tabs a:hover {
    background-color: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    margin-bottom: -1px;
}

/* Project Grid and Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
    margin-top: 20px;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
}

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

.project-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.project-card p {
    color: #666;
    margin-bottom: 15px;
}

.project-card .domain {
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 5px;
    border-radius: 4px;
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
}

.keyword-count {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 29px;
    margin-left: 5px;
    font-size: 12px;
}

/* Project Create Form */
.create-project-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    margin-bottom: 15px;
}

.form-row > div {
    flex: 1;
    margin-right: 10px;
}

.form-row > div:last-child {
    margin-right: 0;
}

/* Buttons and Actions */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}

.actions form {
    margin: 0;
}

.btn {
    padding: 8px 15px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
}

.view-btn {
    background-color: #2196F3;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    font-weight: bold;
    padding: 8px 15px;
    flex: 1;
}

.delete-btn {
    background-color: #f44336;
    flex: 1;
}

.btn-primary {
    background-color: #2196F3;
}

.btn-success {
    background-color: #4CAF50;
}

.btn-danger {
    background-color: #f44336;
}

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

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

.back-btn i {
    margin-right: 5px;
}

/* Project Detail Page */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.domain-badge {
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    margin-left: 10px;
}

.keyword-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
}

.actions-bar .btn {
    margin-left: 10px;
}

.actions-bar h3 {
    margin-bottom: 0;
}

/* PDF export button */
.btn-primary .fa-file-pdf {
    margin-right: 5px;
}

/* Keyword Table */
.keyword-table {
    width: 100%;
    border-collapse: collapse;
}

.keyword-table th, .keyword-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.keyword-table th {
    background-color: #f5f5f5;
}

.keyword-table tr:hover {
    background-color: #f9f9f9;
}

/* Position Dots and History */
.position-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    background-color: #2196F3;
    text-align: center;
    line-height: 24px;
    margin-right: 15px;
    font-size: 12px;
    position: relative;
}

.position-history {
    display: flex;
    align-items: center;
}

.position-dot.top-10 {
    background-color: #4CAF50; /* Green for top 10 */
}

.position-dot.top-30 {
    background-color: #FF9800; /* Orange for top 30 */
}

.position-dot.top-50 {
    background-color: #2196F3; /* Blue for top 50 */
}

.position-dot.top-100 {
    background-color: #9E9E9E; /* Grey for top 100 */
}

.position-dot.not-ranked {
    background-color: #607D8B; /* Blue grey for not ranked */
}

.position-dot.not-available {
    background-color: #ccc;
}

.position-change {
    position: absolute;
    top: -8px;
    right: -12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.position-change i {
    font-size: 9px;
}

.position-change.improved {
    color: #4CAF50;
    border-color: #4CAF50;
}

.position-change.declined {
    color: #f44336;
    border-color: #f44336;
}

.position-dot .tooltip {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.position-dot:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.not-tracked {
    color: #999;
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
}

.status-pending {
    background-color: #FF9800;
}

.status-processing {
    background-color: #2196F3;
}

.status-completed {
    background-color: #4CAF50;
}

.status-failed {
    background-color: #f44336;
}

/* Email Reports Section */
.email-reports-section {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.email-settings {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.report-info {
    margin-top: 10px;
    color: #666;
    display: flex;
    align-items: center;
}

.report-info .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.email-toggle-form .form-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.email-toggle-form label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.email-toggle-form input[type="checkbox"] {
    margin-right: 10px;
}

.add-email-form .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.add-email-form input[type="email"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.email-recipients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.email-recipients-table th,
.email-recipients-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.email-recipients-table th {
    font-weight: 600;
    background-color: #f9f9f9;
}

.email-recipients-table .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
} 