/* Global Variables and Reset */
:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --secondary: #2ecc71;
  --secondary-dark: #27ae60;
  --danger: #e74c3c;
  --danger-dark: #c0392b;
  --warning: #f39c12;
  --warning-dark: #e67e22;
  --dark: #2c3e50;
  --dark-light: #34495e;
  --light: #ecf0f1;
  --gray: #95a5a6;
  --gray-light: #bdc3c7;
  --telegram: #0088cc;
  --minecraft: #5ba34b;
  --samp: #f39c12;
  --crmp: #9b59b6;
  --vds: #3498db;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
header {
  background-color: var(--dark);
  color: white;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
}

.logo a {
  color: white;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
  position: relative;
}

nav ul li a {
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s;
  font-weight: 500;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 15px;
}

.balance {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
}

.auth-btn {
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s;
  font-weight: 500;
}

.auth-btn.login {
  background-color: transparent;
  border: 1px solid white;
  color: white;
}

.auth-btn.register {
  background-color: var(--primary);
  color: white;
}

.auth-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Main Content */
main {
  flex: 1;
  padding: 30px 0;
}

.page-title {
  margin-bottom: 30px;
  color: var(--dark);
  position: relative;
  padding-bottom: 15px;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary);
}

/* Forms */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* Button Variants */
.btn-primary {
  background-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--secondary);
}
.btn-success:hover {
  background-color: var(--secondary-dark);
}

.btn-danger {
  background-color: var(--danger);
}
.btn-danger:hover {
  background-color: var(--danger-dark);
}

.btn-warning {
  background-color: var(--warning);
}
.btn-warning:hover {
  background-color: var(--warning-dark);
}

.btn-telegram {
  background-color: var(--telegram);
}
.btn-telegram:hover {
  background-color: #0077b5;
}

.btn-minecraft {
  background-color: var(--minecraft);
}
.btn-minecraft:hover {
  background-color: #4a8a3a;
}

.btn-samp {
  background-color: var(--samp);
}
.btn-samp:hover {
  background-color: #e67e22;
}

.btn-crmp {
  background-color: var(--crmp);
}
.btn-crmp:hover {
  background-color: #8e44ad;
}

.btn-vds {
  background-color: var(--vds);
}
.btn-vds:hover {
  background-color: #2980b9;
}

/* Alerts */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  border: 1px solid transparent;
}

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

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

/* Server Cards */
.server-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 20px;
}

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

.server-card-header {
  padding: 15px 20px;
  background-color: var(--light);
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.server-card-title {
  font-weight: 600;
  color: var(--dark);
  font-size: 18px;
}

.server-card-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-active {
  background-color: var(--secondary);
  color: white;
}

.status-suspended {
  background-color: var(--danger);
  color: white;
}

.status-pending {
  background-color: var(--warning);
  color: white;
}

.server-card-body {
  padding: 20px;
}

.server-info-row {
  display: flex;
  margin-bottom: 12px;
}

.server-info-label {
  font-weight: 600;
  color: var(--dark);
  min-width: 150px;
}

.server-info-value {
  color: #555;
  word-break: break-all;
}

.server-card-footer {
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
  text-align: right;
}

/* Server Management */
.server-management-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 40px;
}

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

.server-status-badge {
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}

.server-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.detail-card {
  background: #f9fafc;
  border-radius: 8px;
  padding: 25px;
  border: 1px solid #e1e5eb;
  transition: all 0.3s;
}

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

.detail-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--dark);
  font-size: 18px;
  position: relative;
  padding-bottom: 10px;
}

.detail-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e1e5eb;
}

.detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-row span:first-child {
  font-weight: 600;
  color: var(--dark-light);
}

.password-field {
  font-family: monospace;
  letter-spacing: 2px;
  background: #f1f1f1;
  padding: 2px 6px;
  border-radius: 3px;
}

.btn-show-password {
  margin-left: 10px;
  padding: 4px 10px;
  background: #e1e5eb;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-show-password:hover {
  background: #d1d5db;
}

.server-actions-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
  border: 1px solid #e1e5eb;
  margin-top: 30px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn-action i {
  font-size: 18px;
}

.btn-action.btn-danger {
  background: var(--danger);
}

.btn-action.btn-telegram {
  background: var(--telegram);
  text-decoration: none;
}

.action-output {
  margin-top: 25px;
  padding: 20px;
  border-radius: 6px;
  background: white;
  border: 1px solid #e1e5eb;
  min-height: 100px;
}

.loading {
  color: var(--primary);
  text-align: center;
  padding: 15px;
  font-size: 16px;
}

.loading i {
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

.success-message {
  color: var(--secondary);
  padding: 10px;
  font-size: 16px;
}

.error-message {
  color: var(--danger);
  padding: 10px;
  font-size: 16px;
}

pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 15px;
  font-size: 14px;
  font-family: monospace;
}

/* Pricing Plans */
.pricing-plans {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 50px 0;
}

.pricing-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  width: 320px;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.pricing-card.featured {
  border: 3px solid var(--primary);
}

.pricing-card.featured::before {
  content: 'РЕКОМЕНДУЕМ';
  position: absolute;
  top: 15px;
  right: -35px;
  background-color: var(--primary);
  color: white;
  padding: 3px 35px;
  transform: rotate(45deg);
  font-size: 12px;
  font-weight: bold;
  z-index: 1;
}

.pricing-header {
  padding: 30px;
  text-align: center;
  background-color: var(--light);
  position: relative;
}

.pricing-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 15px;
}

.pricing-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 5px;
}

.pricing-period {
  font-size: 16px;
  color: var(--gray);
  font-weight: 500;
}

.pricing-features {
  padding: 30px;
}

.pricing-features ul {
  list-style: none;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  align-items: center;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '✓';
  color: var(--secondary);
  margin-right: 12px;
  font-weight: bold;
  font-size: 18px;
}

.pricing-footer {
  padding: 25px;
  text-align: center;
  background-color: #f9f9f9;
}

/* Admin Styles */
.admin-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 40px;
}

.admin-actions {
  margin-bottom: 30px;
}

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

.admin-table th, .admin-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background-color: var(--light);
  color: var(--dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}

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

.btn-view {
  background-color: var(--primary);
  color: white;
}

.btn-edit {
  background-color: var(--warning);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  margin-right: 5px;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h3 {
  margin-bottom: 20px;
  font-size: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: #ddd;
  transition: all 0.3s;
}

.footer-section ul li a:hover {
  color: white;
  padding-left: 5px;
}

.copyright {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bbb;
  font-size: 14px;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 136, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 136, 204, 0);
  }
}

.btn-pulse {
  animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }
  
  nav ul {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav ul li {
    margin: 0 10px 10px 0;
  }
  
  .user-panel {
    margin-top: 15px;
    justify-content: center;
  }
  
  .pricing-card {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .server-details-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .admin-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 576px) {
  .form-container {
    padding: 20px;
  }
  
  .server-management-container {
    padding: 20px;
  }
  
  .detail-card {
    padding: 20px;
  }
  
  .detail-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .detail-row span:first-child {
    font-size: 14px;
  }
  
  .footer-section {
    flex: 100%;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.hidden {
  display: none !important;
}

/* Footer Styles */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-info i {
    margin-right: 10px;
    color: #3498db;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    margin-top: 20px;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
}

.social-link.telegram { background: #0088cc; }
.social-link.vk { background: #4a76a8; }
.social-link.discord { background: #7289da; }

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #bdc3c7;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    color: #3498db;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
}

/* Balance Styles */
.balance {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.balance i {
    font-size: 14px;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.balance-card {
    text-align: center;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0;
}

/* Servers List */
.servers-section {
    margin-top: 30px;
}

.server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.server-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.server-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background-color: var(--success);
    color: white;
}

.status-suspended {
    background-color: var(--danger);
    color: white;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

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

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Стили для вывода действий */
#action-output {
    margin-top: 20px;
    min-height: 50px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

pre {
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
    font-family: monospace;
    white-space: pre-wrap;
}

/* Стили для вывода действий */
#action-output {
    margin-top: 20px;
    min-height: 50px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

pre {
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
    font-family: monospace;
    white-space: pre-wrap;
}